<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE TupleSections #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.GHCJS</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-7"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getGhcInfo"><span class="hs-identifier">getGhcInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#configure"><span class="hs-identifier">configure</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getInstalledPackages"><span class="hs-identifier">getInstalledPackages</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getInstalledPackagesMonitorFiles"><span class="hs-identifier">getInstalledPackagesMonitorFiles</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getPackageDBContents"><span class="hs-identifier">getPackageDBContents</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#buildLib"><span class="hs-identifier">buildLib</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#buildFLib"><span class="hs-identifier">buildFLib</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#buildExe"><span class="hs-identifier">buildExe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#replLib"><span class="hs-identifier">replLib</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#replFLib"><span class="hs-identifier">replFLib</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#replExe"><span class="hs-identifier">replExe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#startInterpreter"><span class="hs-identifier">startInterpreter</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#installLib"><span class="hs-identifier">installLib</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#installFLib"><span class="hs-identifier">installFLib</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#installExe"><span class="hs-identifier">installExe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#libAbiHash"><span class="hs-identifier">libAbiHash</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#hcPkgInfo"><span class="hs-identifier">hcPkgInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#registerPackage"><span class="hs-identifier">registerPackage</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#componentGhcOptions"><span class="hs-identifier">componentGhcOptions</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#componentCcGhcOptions"><span class="hs-identifier">componentCcGhcOptions</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getLibDir"><span class="hs-identifier">getLibDir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#isDynamic"><span class="hs-identifier">isDynamic</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getGlobalPackageDB"><span class="hs-identifier">getGlobalPackageDB</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#pkgRoot"><span class="hs-identifier">pkgRoot</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#runCmd"><span class="hs-identifier">runCmd</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Constructing and deconstructing GHC environment files</span></span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.Internal.html#GhcEnvironmentFileEntry"><span class="hs-identifier">Internal.GhcEnvironmentFileEntry</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.Internal.html#simpleGhcEnvironmentFile"><span class="hs-identifier">Internal.simpleGhcEnvironmentFile</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.Internal.html#renderGhcEnvironmentFile"><span class="hs-identifier">Internal.renderGhcEnvironmentFile</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.Internal.html#writeGhcEnvironmentFile"><span class="hs-identifier">Internal.writeGhcEnvironmentFile</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.Internal.html#ghcPlatformAndVersionString"><span class="hs-identifier">Internal.ghcPlatformAndVersionString</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.EnvironmentParser.html#readGhcEnvironmentFile"><span class="hs-identifier">readGhcEnvironmentFile</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.EnvironmentParser.html#parseGhcEnvironmentFile"><span class="hs-identifier">parseGhcEnvironmentFile</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.EnvironmentParser.html#ParseErrorExc"><span class="hs-identifier">ParseErrorExc</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Version-specific implementation quirks</span></span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.ImplInfo.html#getImplInfo"><span class="hs-identifier">getImplInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHC.ImplInfo.html#GhcImplInfo"><span class="hs-identifier">GhcImplInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.GHC.Internal.html"><span class="hs-identifier">Distribution.Simple.GHC.Internal</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Internal</span></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.GHC.ImplInfo.html"><span class="hs-identifier">Distribution.Simple.GHC.ImplInfo</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.GHC.EnvironmentParser.html"><span class="hs-identifier">Distribution.Simple.GHC.EnvironmentParser</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.Utils.html"><span class="hs-identifier">Distribution.PackageDescription.Utils</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.PackageDescription.Utils.html#cabalBug"><span class="hs-identifier">cabalBug</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.html"><span class="hs-identifier">Distribution.PackageDescription</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PD</span></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.InstalledPackageInfo.html"><span class="hs-identifier">Distribution.InstalledPackageInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier">InstalledPackageInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.InstalledPackageInfo.html"><span class="hs-identifier">Distribution.InstalledPackageInfo</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">InstalledPackageInfo</span></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.PackageIndex.html"><span class="hs-identifier">Distribution.Simple.PackageIndex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.PackageIndex.html#InstalledPackageIndex"><span class="hs-identifier">InstalledPackageIndex</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.PackageIndex.html"><span class="hs-identifier">Distribution.Simple.PackageIndex</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PackageIndex</span></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Simple.LocalBuildInfo</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html"><span class="hs-identifier">Distribution.Types.ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.Hpc.html"><span class="hs-identifier">Distribution.Simple.Hpc</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Hpc</span></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildPaths.html"><span class="hs-identifier">Distribution.Simple.BuildPaths</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Package.html"><span class="hs-identifier">Distribution.Package</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html"><span class="hs-identifier">Distribution.ModuleName</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">ModuleName</span></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html"><span class="hs-identifier">Distribution.ModuleName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier">ModuleName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.html"><span class="hs-identifier">Distribution.Simple.Program</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html"><span class="hs-identifier">Distribution.Simple.Program.HcPkg</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">HcPkg</span></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Strip.html"><span class="hs-identifier">Distribution.Simple.Program.Strip</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Strip</span></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.GHC.html"><span class="hs-identifier">Distribution.Simple.Program.GHC</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html"><span class="hs-identifier">Distribution.Simple.Setup</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html"><span class="hs-identifier">Distribution.Simple.Setup</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Cabal</span></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html"><span class="hs-identifier">Distribution.Simple.Compiler</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.CabalSpecVersion.html"><span class="hs-identifier">Distribution.CabalSpecVersion</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Version.html"><span class="hs-identifier">Distribution.Version</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.System.html"><span class="hs-identifier">Distribution.System</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html"><span class="hs-identifier">Distribution.Verbosity</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Utils.NubList.html"><span class="hs-identifier">Distribution.Utils.NubList</span></a></span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#msum"><span class="hs-identifier">msum</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Unicode.html#isLower"><span class="hs-identifier">isLower</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span>
</span><span id="line-78"></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier">doesFileExist</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#getAppUserDataDirectory"><span class="hs-identifier">getAppUserDataDirectory</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#createDirectoryIfMissing"><span class="hs-identifier">createDirectoryIfMissing</span></a></span><span>
</span><span id="line-79"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#canonicalizePath"><span class="hs-identifier">canonicalizePath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#removeFile"><span class="hs-identifier">removeFile</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#renameFile"><span class="hs-identifier">renameFile</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>          </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator">(&lt;/&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator">(&lt;.&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier">takeExtension</span></a></span><span>
</span><span id="line-81"></span><span>                                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier">takeDirectory</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-identifier">replaceExtension</span></a></span><span>
</span><span id="line-82"></span><span>                                </span><span class="hs-special">,</span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#isRelative"><span class="hs-identifier">isRelative</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/System.Info.html#"><span class="hs-identifier">System.Info</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- Configuring</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#configure"><span class="hs-identifier hs-type">configure</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-89"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-90"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-91"></span><span id="configure"><span class="annot"><span class="annottext">configure :: Verbosity
-&gt; Maybe String
-&gt; Maybe String
-&gt; ProgramDb
-&gt; IO (Compiler, Maybe Platform, ProgramDb)
</span><a href="Distribution.Simple.GHCJS.html#configure"><span class="hs-identifier hs-var hs-var">configure</span></a></span></span><span> </span><span id="local-6989586621679718660"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718659"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679718659"><span class="hs-identifier hs-var">hcPath</span></a></span></span><span> </span><span id="local-6989586621679718658"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679718658"><span class="hs-identifier hs-var">hcPkgPath</span></a></span></span><span> </span><span id="local-6989586621679718657"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718657"><span class="hs-identifier hs-var">conf0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679718656"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718655"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718655"><span class="hs-identifier hs-var">ghcjsVersion</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718654"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718654"><span class="hs-identifier hs-var">progdb1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-94"></span><span>    </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program
-&gt; VersionRange
-&gt; ProgramDb
-&gt; IO (ConfiguredProgram, Version, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgramVersion"><span class="hs-identifier hs-var">requireProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span>
</span><span id="line-95"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#orLaterVersion"><span class="hs-identifier hs-var">orLaterVersion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-96"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Maybe String -&gt; ProgramDb -&gt; ProgramDb
</span><a href="Distribution.Simple.Program.Db.html#userMaybeSpecifyPath"><span class="hs-identifier hs-var">userMaybeSpecifyPath</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghcjs&quot;</span></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679718659"><span class="hs-identifier hs-var">hcPath</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718657"><span class="hs-identifier hs-var">conf0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679718648"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718648"><span class="hs-identifier hs-var">ghcjsGhcVersion</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.GHCJS.html#findGhcjsGhcVersion"><span class="hs-identifier hs-var">findGhcjsGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718648"><span class="hs-identifier hs-var">ghcjsGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-100"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#warn"><span class="hs-identifier hs-var">warn</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-101"></span><span>         </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unknown/unsupported 'ghc' version detected &quot;</span></span><span>
</span><span id="line-102"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;(Cabal &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="Distribution.Simple.Utils.html#cabalVersion"><span class="hs-identifier hs-var">cabalVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; supports 'ghc' version &lt; 8.8): &quot;</span></span><span>
</span><span id="line-103"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is based on GHC version &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-104"></span><span>      </span><span class="annot"><span class="annottext">Version -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718648"><span class="hs-identifier hs-var">ghcjsGhcVersion</span></a></span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718640"><span class="annot"><span class="annottext">implInfo :: GhcImplInfo
</span><a href="#local-6989586621679718640"><span class="hs-identifier hs-var hs-var">implInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; GhcImplInfo
</span><a href="Distribution.Simple.GHC.ImplInfo.html#ghcjsVersionImplInfo"><span class="hs-identifier hs-var">ghcjsVersionImplInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718655"><span class="hs-identifier hs-var">ghcjsVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718648"><span class="hs-identifier hs-var">ghcjsGhcVersion</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-comment">-- This is slightly tricky, we have to configure ghc first, then we use the</span><span>
</span><span id="line-109"></span><span>  </span><span class="hs-comment">-- location of ghc to help find ghc-pkg in the case that the user did not</span><span>
</span><span id="line-110"></span><span>  </span><span class="hs-comment">-- specify the location of ghc-pkg directly:</span><span>
</span><span id="line-111"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679718638"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718638"><span class="hs-identifier hs-var">ghcjsPkgProg</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718637"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718637"><span class="hs-identifier hs-var">ghcjsPkgVersion</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718636"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718636"><span class="hs-identifier hs-var">progdb2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-112"></span><span>    </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program
-&gt; VersionRange
-&gt; ProgramDb
-&gt; IO (ConfiguredProgram, Version, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgramVersion"><span class="hs-identifier hs-var">requireProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsPkgProgram"><span class="hs-identifier hs-var">ghcjsPkgProgram</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-113"></span><span>      </span><span class="annot"><span class="annottext">programFindLocation :: Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.Program.Types.html#programFindLocation"><span class="hs-identifier hs-var">programFindLocation</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
-&gt; Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessGhcjsPkgFromGhcjsPath"><span class="hs-identifier hs-var">guessGhcjsPkgFromGhcjsPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-114"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-115"></span><span>    </span><span class="annot"><span class="annottext">VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#anyVersion"><span class="hs-identifier hs-var">anyVersion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Maybe String -&gt; ProgramDb -&gt; ProgramDb
</span><a href="Distribution.Simple.Program.Db.html#userMaybeSpecifyPath"><span class="hs-identifier hs-var">userMaybeSpecifyPath</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghcjs-pkg&quot;</span></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679718658"><span class="hs-identifier hs-var">hcPkgPath</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718654"><span class="hs-identifier hs-var">progdb1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679718631"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718631"><span class="hs-identifier hs-var">ghcjsPkgGhcjsVersion</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.GHCJS.html#findGhcjsPkgGhcjsVersion"><span class="hs-identifier hs-var">findGhcjsPkgGhcjsVersion</span></a></span><span>
</span><span id="line-118"></span><span>                                  </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718638"><span class="hs-identifier hs-var">ghcjsPkgProg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718655"><span class="hs-identifier hs-var">ghcjsVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718631"><span class="hs-identifier hs-var">ghcjsPkgGhcjsVersion</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-121"></span><span>       </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Version mismatch between ghcjs and ghcjs-pkg: &quot;</span></span><span>
</span><span id="line-122"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is version &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718655"><span class="hs-identifier hs-var">ghcjsVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; &quot;</span></span><span>
</span><span id="line-123"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718638"><span class="hs-identifier hs-var">ghcjsPkgProg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is version &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718631"><span class="hs-identifier hs-var">ghcjsPkgGhcjsVersion</span></a></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718648"><span class="hs-identifier hs-var">ghcjsGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718637"><span class="hs-identifier hs-var">ghcjsPkgVersion</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-126"></span><span>       </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Version mismatch between ghcjs and ghcjs-pkg: &quot;</span></span><span>
</span><span id="line-127"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-128"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; was built with GHC version &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718648"><span class="hs-identifier hs-var">ghcjsGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; &quot;</span></span><span>
</span><span id="line-129"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718638"><span class="hs-identifier hs-var">ghcjsPkgProg</span></a></span><span>
</span><span id="line-130"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; was built with GHC version &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718637"><span class="hs-identifier hs-var">ghcjsPkgVersion</span></a></span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span>  </span><span class="hs-comment">-- Likewise we try to find the matching hsc2hs and haddock programs.</span><span>
</span><span id="line-134"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718626"><span class="annot"><span class="annottext">hsc2hsProgram' :: Program
</span><a href="#local-6989586621679718626"><span class="hs-identifier hs-var hs-var">hsc2hsProgram'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#hsc2hsProgram"><span class="hs-identifier hs-var">hsc2hsProgram</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-135"></span><span>                           </span><span class="annot"><span class="annottext">programFindLocation :: Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.Program.Types.html#programFindLocation"><span class="hs-identifier hs-var">programFindLocation</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-136"></span><span>                             </span><span class="annot"><span class="annottext">ConfiguredProgram
-&gt; Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessHsc2hsFromGhcjsPath"><span class="hs-identifier hs-var">guessHsc2hsFromGhcjsPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-137"></span><span>                       </span><span class="hs-special">}</span><span>
</span><span id="line-138"></span><span>      </span><span id="local-6989586621679718623"><span class="annot"><span class="annottext">haddockProgram' :: Program
</span><a href="#local-6989586621679718623"><span class="hs-identifier hs-var hs-var">haddockProgram'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#haddockProgram"><span class="hs-identifier hs-var">haddockProgram</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-139"></span><span>                           </span><span class="annot"><span class="annottext">programFindLocation :: Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.Program.Types.html#programFindLocation"><span class="hs-identifier hs-var">programFindLocation</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-140"></span><span>                             </span><span class="annot"><span class="annottext">ConfiguredProgram
-&gt; Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessHaddockFromGhcjsPath"><span class="hs-identifier hs-var">guessHaddockFromGhcjsPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-141"></span><span>                       </span><span class="hs-special">}</span><span>
</span><span id="line-142"></span><span>      </span><span id="local-6989586621679718620"><span class="annot"><span class="annottext">hpcProgram' :: Program
</span><a href="#local-6989586621679718620"><span class="hs-identifier hs-var hs-var">hpcProgram'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#hpcProgram"><span class="hs-identifier hs-var">hpcProgram</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-143"></span><span>                        </span><span class="annot"><span class="annottext">programFindLocation :: Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.Program.Types.html#programFindLocation"><span class="hs-identifier hs-var">programFindLocation</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
-&gt; Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessHpcFromGhcjsPath"><span class="hs-identifier hs-var">guessHpcFromGhcjsPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-144"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-145"></span><span>                    </span><span class="hs-comment">{-
      runghcProgram' = runghcProgram {
                        programFindLocation = guessRunghcFromGhcjsPath ghcjsProg
                    } -}</span><span>
</span><span id="line-149"></span><span>      </span><span id="local-6989586621679718617"><span class="annot"><span class="annottext">progdb3 :: ProgramDb
</span><a href="#local-6989586621679718617"><span class="hs-identifier hs-var hs-var">progdb3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; ProgramDb
</span><a href="Distribution.Simple.Program.Db.html#addKnownProgram"><span class="hs-identifier hs-var">addKnownProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679718623"><span class="hs-identifier hs-var">haddockProgram'</span></a></span><span> </span><span class="annot"><span class="annottext">(ProgramDb -&gt; ProgramDb) -&gt; ProgramDb -&gt; ProgramDb
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-150"></span><span>              </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; ProgramDb
</span><a href="Distribution.Simple.Program.Db.html#addKnownProgram"><span class="hs-identifier hs-var">addKnownProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679718626"><span class="hs-identifier hs-var">hsc2hsProgram'</span></a></span><span> </span><span class="annot"><span class="annottext">(ProgramDb -&gt; ProgramDb) -&gt; ProgramDb -&gt; ProgramDb
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-151"></span><span>              </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; ProgramDb
</span><a href="Distribution.Simple.Program.Db.html#addKnownProgram"><span class="hs-identifier hs-var">addKnownProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679718620"><span class="hs-identifier hs-var">hpcProgram'</span></a></span><span> </span><span class="annot"><span class="annottext">(ProgramDb -&gt; ProgramDb) -&gt; ProgramDb -&gt; ProgramDb
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-152"></span><span>              </span><span class="hs-comment">{- addKnownProgram runghcProgram' -}</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718636"><span class="hs-identifier hs-var">progdb2</span></a></span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span>  </span><span id="local-6989586621679718615"><span class="annot"><span class="annottext">[(Language, String)]
</span><a href="#local-6989586621679718615"><span class="hs-identifier hs-var">languages</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; GhcImplInfo -&gt; ConfiguredProgram -&gt; IO [(Language, String)]
</span><a href="Distribution.Simple.GHC.Internal.html#getLanguages"><span class="hs-identifier hs-var">Internal.getLanguages</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679718640"><span class="hs-identifier hs-var">implInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-155"></span><span>  </span><span id="local-6989586621679718613"><span class="annot"><span class="annottext">[(Extension, Maybe String)]
</span><a href="#local-6989586621679718613"><span class="hs-identifier hs-var">extensions</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; GhcImplInfo
-&gt; ConfiguredProgram
-&gt; IO [(Extension, Maybe String)]
</span><a href="Distribution.Simple.GHC.Internal.html#getExtensions"><span class="hs-identifier hs-var">Internal.getExtensions</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679718640"><span class="hs-identifier hs-var">implInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span>  </span><span id="local-6989586621679718611"><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679718611"><span class="hs-identifier hs-var">ghcjsInfo</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; GhcImplInfo -&gt; ConfiguredProgram -&gt; IO [(String, String)]
</span><a href="Distribution.Simple.GHC.Internal.html#getGhcInfo"><span class="hs-identifier hs-var">Internal.getGhcInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718660"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679718640"><span class="hs-identifier hs-var">implInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718656"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-158"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718607"><span class="annot"><span class="annottext">ghcInfoMap :: Map String String
</span><a href="#local-6989586621679718607"><span class="hs-identifier hs-var hs-var">ghcInfoMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(String, String)] -&gt; Map String String
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">Map.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679718611"><span class="hs-identifier hs-var">ghcjsInfo</span></a></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718604"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679718604"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler :: CompilerId
-&gt; AbiTag
-&gt; [CompilerId]
-&gt; [(Language, String)]
-&gt; [(Extension, Maybe String)]
-&gt; Map String String
-&gt; Compiler
</span><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-161"></span><span>        </span><span class="annot"><span class="annottext">compilerId :: CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var">compilerId</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; Version -&gt; CompilerId
</span><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-var">CompilerId</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718655"><span class="hs-identifier hs-var">ghcjsVersion</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-162"></span><span>        </span><span class="annot"><span class="annottext">compilerAbiTag :: AbiTag
</span><a href="Distribution.Simple.Compiler.html#compilerAbiTag"><span class="hs-identifier hs-var">compilerAbiTag</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; AbiTag
</span><a href="Distribution.Compiler.html#AbiTag"><span class="hs-identifier hs-var">AbiTag</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; AbiTag) -&gt; String -&gt; AbiTag
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-163"></span><span>          </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghc&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; String) -&gt; [Int] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">([Int] -&gt; [String]) -&gt; (Version -&gt; [Int]) -&gt; Version -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; [Int]
</span><a href="Distribution.Types.Version.html#versionNumbers"><span class="hs-identifier hs-var">versionNumbers</span></a></span><span> </span><span class="annot"><span class="annottext">(Version -&gt; [String]) -&gt; Version -&gt; [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718648"><span class="hs-identifier hs-var">ghcjsGhcVersion</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-164"></span><span>        </span><span class="annot"><span class="annottext">compilerCompat :: [CompilerId]
</span><a href="Distribution.Simple.Compiler.html#compilerCompat"><span class="hs-identifier hs-var">compilerCompat</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CompilerFlavor -&gt; Version -&gt; CompilerId
</span><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-var">CompilerId</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718648"><span class="hs-identifier hs-var">ghcjsGhcVersion</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-165"></span><span>        </span><span class="annot"><span class="annottext">compilerLanguages :: [(Language, String)]
</span><a href="Distribution.Simple.Compiler.html#compilerLanguages"><span class="hs-identifier hs-var">compilerLanguages</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Language, String)]
</span><a href="#local-6989586621679718615"><span class="hs-identifier hs-var">languages</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-166"></span><span>        </span><span class="annot"><span class="annottext">compilerExtensions :: [(Extension, Maybe String)]
</span><a href="Distribution.Simple.Compiler.html#compilerExtensions"><span class="hs-identifier hs-var">compilerExtensions</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Extension, Maybe String)]
</span><a href="#local-6989586621679718613"><span class="hs-identifier hs-var">extensions</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-167"></span><span>        </span><span class="annot"><span class="annottext">compilerProperties :: Map String String
</span><a href="Distribution.Simple.Compiler.html#compilerProperties"><span class="hs-identifier hs-var">compilerProperties</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map String String
</span><a href="#local-6989586621679718607"><span class="hs-identifier hs-var">ghcInfoMap</span></a></span><span>
</span><span id="line-168"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-169"></span><span>      </span><span id="local-6989586621679718588"><span class="annot"><span class="annottext">compPlatform :: Maybe Platform
</span><a href="#local-6989586621679718588"><span class="hs-identifier hs-var hs-var">compPlatform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(String, String)] -&gt; Maybe Platform
</span><a href="Distribution.Simple.GHC.Internal.html#targetPlatform"><span class="hs-identifier hs-var">Internal.targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679718611"><span class="hs-identifier hs-var">ghcjsInfo</span></a></span><span>
</span><span id="line-170"></span><span>  </span><span class="annot"><span class="annottext">(Compiler, Maybe Platform, ProgramDb)
-&gt; IO (Compiler, Maybe Platform, ProgramDb)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718604"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe Platform
</span><a href="#local-6989586621679718588"><span class="hs-identifier hs-var">compPlatform</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718617"><span class="hs-identifier hs-var">progdb3</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#guessGhcjsPkgFromGhcjsPath"><span class="hs-identifier hs-type">guessGhcjsPkgFromGhcjsPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-173"></span><span>                           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Find.html#ProgramSearchPath"><span class="hs-identifier hs-type">ProgramSearchPath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span id="guessGhcjsPkgFromGhcjsPath"><span class="annot"><span class="annottext">guessGhcjsPkgFromGhcjsPath :: ConfiguredProgram
-&gt; Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessGhcjsPkgFromGhcjsPath"><span class="hs-identifier hs-var hs-var">guessGhcjsPkgFromGhcjsPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Program
-&gt; ConfiguredProgram
-&gt; Verbosity
-&gt; ProgramSearchPath
-&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessToolFromGhcjsPath"><span class="hs-identifier hs-var">guessToolFromGhcjsPath</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsPkgProgram"><span class="hs-identifier hs-var">ghcjsPkgProgram</span></a></span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#guessHsc2hsFromGhcjsPath"><span class="hs-identifier hs-type">guessHsc2hsFromGhcjsPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-177"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Find.html#ProgramSearchPath"><span class="hs-identifier hs-type">ProgramSearchPath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span id="guessHsc2hsFromGhcjsPath"><span class="annot"><span class="annottext">guessHsc2hsFromGhcjsPath :: ConfiguredProgram
-&gt; Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessHsc2hsFromGhcjsPath"><span class="hs-identifier hs-var hs-var">guessHsc2hsFromGhcjsPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Program
-&gt; ConfiguredProgram
-&gt; Verbosity
-&gt; ProgramSearchPath
-&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessToolFromGhcjsPath"><span class="hs-identifier hs-var">guessToolFromGhcjsPath</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#hsc2hsProgram"><span class="hs-identifier hs-var">hsc2hsProgram</span></a></span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#guessHaddockFromGhcjsPath"><span class="hs-identifier hs-type">guessHaddockFromGhcjsPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-181"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Find.html#ProgramSearchPath"><span class="hs-identifier hs-type">ProgramSearchPath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span id="guessHaddockFromGhcjsPath"><span class="annot"><span class="annottext">guessHaddockFromGhcjsPath :: ConfiguredProgram
-&gt; Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessHaddockFromGhcjsPath"><span class="hs-identifier hs-var hs-var">guessHaddockFromGhcjsPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Program
-&gt; ConfiguredProgram
-&gt; Verbosity
-&gt; ProgramSearchPath
-&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessToolFromGhcjsPath"><span class="hs-identifier hs-var">guessToolFromGhcjsPath</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#haddockProgram"><span class="hs-identifier hs-var">haddockProgram</span></a></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#guessHpcFromGhcjsPath"><span class="hs-identifier hs-type">guessHpcFromGhcjsPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span>
</span><span id="line-185"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Find.html#ProgramSearchPath"><span class="hs-identifier hs-type">ProgramSearchPath</span></a></span><span>
</span><span id="line-186"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span id="guessHpcFromGhcjsPath"><span class="annot"><span class="annottext">guessHpcFromGhcjsPath :: ConfiguredProgram
-&gt; Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessHpcFromGhcjsPath"><span class="hs-identifier hs-var hs-var">guessHpcFromGhcjsPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Program
-&gt; ConfiguredProgram
-&gt; Verbosity
-&gt; ProgramSearchPath
-&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessToolFromGhcjsPath"><span class="hs-identifier hs-var">guessToolFromGhcjsPath</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#hpcProgram"><span class="hs-identifier hs-var">hpcProgram</span></a></span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#guessToolFromGhcjsPath"><span class="hs-identifier hs-type">guessToolFromGhcjsPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#Program"><span class="hs-identifier hs-type">Program</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span>
</span><span id="line-191"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Find.html#ProgramSearchPath"><span class="hs-identifier hs-type">ProgramSearchPath</span></a></span><span>
</span><span id="line-192"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-193"></span><span id="guessToolFromGhcjsPath"><span class="annot"><span class="annottext">guessToolFromGhcjsPath :: Program
-&gt; ConfiguredProgram
-&gt; Verbosity
-&gt; ProgramSearchPath
-&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.GHCJS.html#guessToolFromGhcjsPath"><span class="hs-identifier hs-var hs-var">guessToolFromGhcjsPath</span></a></span></span><span> </span><span id="local-6989586621679718585"><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679718585"><span class="hs-identifier hs-var">tool</span></a></span></span><span> </span><span id="local-6989586621679718584"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718584"><span class="hs-identifier hs-var">ghcjsProg</span></a></span></span><span> </span><span id="local-6989586621679718583"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718583"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718582"><span class="annot"><span class="annottext">ProgramSearchPath
</span><a href="#local-6989586621679718582"><span class="hs-identifier hs-var">searchpath</span></a></span></span><span>
</span><span id="line-194"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718581"><span class="annot"><span class="annottext">toolname :: String
</span><a href="#local-6989586621679718581"><span class="hs-identifier hs-var hs-var">toolname</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Program -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programName"><span class="hs-identifier hs-var hs-var">programName</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679718585"><span class="hs-identifier hs-var">tool</span></a></span><span>
</span><span id="line-195"></span><span>           </span><span id="local-6989586621679718579"><span class="annot"><span class="annottext">given_path :: String
</span><a href="#local-6989586621679718579"><span class="hs-identifier hs-var hs-var">given_path</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718584"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-196"></span><span>           </span><span id="local-6989586621679718578"><span class="annot"><span class="annottext">given_dir :: String
</span><a href="#local-6989586621679718578"><span class="hs-identifier hs-var hs-var">given_dir</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718579"><span class="hs-identifier hs-var">given_path</span></a></span><span>
</span><span id="line-197"></span><span>       </span><span id="local-6989586621679718577"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718577"><span class="hs-identifier hs-var">real_path</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="../../directory/src/System.Directory.html#canonicalizePath"><span class="hs-identifier hs-var">canonicalizePath</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718579"><span class="hs-identifier hs-var">given_path</span></a></span><span>
</span><span id="line-198"></span><span>       </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718576"><span class="annot"><span class="annottext">real_dir :: String
</span><a href="#local-6989586621679718576"><span class="hs-identifier hs-var hs-var">real_dir</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718577"><span class="hs-identifier hs-var">real_path</span></a></span><span>
</span><span id="line-199"></span><span>           </span><span id="local-6989586621679718575"><span class="annot"><span class="annottext">versionSuffix :: String -&gt; String
</span><a href="#local-6989586621679718575"><span class="hs-identifier hs-var hs-var">versionSuffix</span></a></span></span><span> </span><span id="local-6989586621679718574"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718574"><span class="hs-identifier hs-var">path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679718573"><span class="hs-identifier hs-var">takeVersionSuffix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Simple.Utils.html#dropExeExtension"><span class="hs-identifier hs-var">dropExeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718574"><span class="hs-identifier hs-var">path</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-200"></span><span>           </span><span id="local-6989586621679718571"><span class="annot"><span class="annottext">given_suf :: String
</span><a href="#local-6989586621679718571"><span class="hs-identifier hs-var hs-var">given_suf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679718575"><span class="hs-identifier hs-var">versionSuffix</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718579"><span class="hs-identifier hs-var">given_path</span></a></span><span>
</span><span id="line-201"></span><span>           </span><span id="local-6989586621679718570"><span class="annot"><span class="annottext">real_suf :: String
</span><a href="#local-6989586621679718570"><span class="hs-identifier hs-var hs-var">real_suf</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679718575"><span class="hs-identifier hs-var">versionSuffix</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718577"><span class="hs-identifier hs-var">real_path</span></a></span><span>
</span><span id="line-202"></span><span>           </span><span id="local-6989586621679718569"><span class="annot"><span class="annottext">guessNormal :: String -&gt; String
</span><a href="#local-6989586621679718569"><span class="hs-identifier hs-var hs-var">guessNormal</span></a></span></span><span>         </span><span id="local-6989586621679718568"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718568"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718568"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718581"><span class="hs-identifier hs-var">toolname</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#exeExtension"><span class="hs-identifier hs-var">exeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="Distribution.System.html#buildPlatform"><span class="hs-identifier hs-var">buildPlatform</span></a></span><span>
</span><span id="line-203"></span><span>           </span><span id="local-6989586621679718565"><span class="annot"><span class="annottext">guessGhcjs :: String -&gt; String
</span><a href="#local-6989586621679718565"><span class="hs-identifier hs-var hs-var">guessGhcjs</span></a></span></span><span>          </span><span id="local-6989586621679718564"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718564"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718564"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718581"><span class="hs-identifier hs-var">toolname</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-ghcjs&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-204"></span><span>                                         </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#exeExtension"><span class="hs-identifier hs-var">exeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="Distribution.System.html#buildPlatform"><span class="hs-identifier hs-var">buildPlatform</span></a></span><span>
</span><span id="line-205"></span><span>           </span><span id="local-6989586621679718563"><span class="annot"><span class="annottext">guessGhcjsVersioned :: String -&gt; String -&gt; String
</span><a href="#local-6989586621679718563"><span class="hs-identifier hs-var hs-var">guessGhcjsVersioned</span></a></span></span><span> </span><span id="local-6989586621679718562"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718562"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span id="local-6989586621679718561"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718561"><span class="hs-identifier hs-var">suf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718562"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718581"><span class="hs-identifier hs-var">toolname</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-ghcjs&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718561"><span class="hs-identifier hs-var">suf</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>                                             </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#exeExtension"><span class="hs-identifier hs-var">exeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="Distribution.System.html#buildPlatform"><span class="hs-identifier hs-var">buildPlatform</span></a></span><span>
</span><span id="line-207"></span><span>           </span><span id="local-6989586621679718560"><span class="annot"><span class="annottext">guessVersioned :: String -&gt; String -&gt; String
</span><a href="#local-6989586621679718560"><span class="hs-identifier hs-var hs-var">guessVersioned</span></a></span></span><span>      </span><span id="local-6989586621679718559"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718559"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span id="local-6989586621679718558"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718558"><span class="hs-identifier hs-var">suf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718559"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718581"><span class="hs-identifier hs-var">toolname</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718558"><span class="hs-identifier hs-var">suf</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>                                             </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#exeExtension"><span class="hs-identifier hs-var">exeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="Distribution.System.html#buildPlatform"><span class="hs-identifier hs-var">buildPlatform</span></a></span><span>
</span><span id="line-209"></span><span>           </span><span id="local-6989586621679718556"><span class="annot"><span class="annottext">mkGuesses :: String -&gt; String -&gt; [String]
</span><a href="#local-6989586621679718556"><span class="hs-identifier hs-var hs-var">mkGuesses</span></a></span></span><span> </span><span id="local-6989586621679718555"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718555"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span id="local-6989586621679718554"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718554"><span class="hs-identifier hs-var">suf</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718554"><span class="hs-identifier hs-var">suf</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679718565"><span class="hs-identifier hs-var">guessGhcjs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718555"><span class="hs-identifier hs-var">dir</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679718569"><span class="hs-identifier hs-var">guessNormal</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718555"><span class="hs-identifier hs-var">dir</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-210"></span><span>                             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="#local-6989586621679718563"><span class="hs-identifier hs-var">guessGhcjsVersioned</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718555"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718554"><span class="hs-identifier hs-var">suf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-211"></span><span>                                            </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="#local-6989586621679718560"><span class="hs-identifier hs-var">guessVersioned</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718555"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718554"><span class="hs-identifier hs-var">suf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-212"></span><span>                                            </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679718565"><span class="hs-identifier hs-var">guessGhcjs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718555"><span class="hs-identifier hs-var">dir</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-213"></span><span>                                            </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679718569"><span class="hs-identifier hs-var">guessNormal</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718555"><span class="hs-identifier hs-var">dir</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-214"></span><span>           </span><span id="local-6989586621679718550"><span class="annot"><span class="annottext">guesses :: [String]
</span><a href="#local-6989586621679718550"><span class="hs-identifier hs-var hs-var">guesses</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; [String]
</span><a href="#local-6989586621679718556"><span class="hs-identifier hs-var">mkGuesses</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718578"><span class="hs-identifier hs-var">given_dir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718571"><span class="hs-identifier hs-var">given_suf</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-215"></span><span>                            </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718577"><span class="hs-identifier hs-var">real_path</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718579"><span class="hs-identifier hs-var">given_path</span></a></span><span>
</span><span id="line-216"></span><span>                                </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-217"></span><span>                                </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; [String]
</span><a href="#local-6989586621679718556"><span class="hs-identifier hs-var">mkGuesses</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718576"><span class="hs-identifier hs-var">real_dir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718570"><span class="hs-identifier hs-var">real_suf</span></a></span><span>
</span><span id="line-218"></span><span>       </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718583"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;looking for tool &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718581"><span class="hs-identifier hs-var">toolname</span></a></span><span>
</span><span id="line-219"></span><span>         </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; near compiler in &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718578"><span class="hs-identifier hs-var">given_dir</span></a></span><span>
</span><span id="line-220"></span><span>       </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#debug"><span class="hs-identifier hs-var">debug</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718583"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;candidate locations: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718550"><span class="hs-identifier hs-var">guesses</span></a></span><span>
</span><span id="line-221"></span><span>       </span><span id="local-6989586621679718547"><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621679718547"><span class="hs-identifier hs-var">exists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO Bool) -&gt; [String] -&gt; IO [Bool]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718550"><span class="hs-identifier hs-var">guesses</span></a></span><span>
</span><span id="line-222"></span><span>       </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718545"><span class="hs-identifier hs-var">file</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679718545"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718545"><span class="hs-identifier hs-var">file</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [Bool] -&gt; [(String, Bool)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718550"><span class="hs-identifier hs-var">guesses</span></a></span><span> </span><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621679718547"><span class="hs-identifier hs-var">exists</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-223"></span><span>                   </span><span class="hs-comment">-- If we can't find it near ghc, fall back to the usual</span><span>
</span><span id="line-224"></span><span>                   </span><span class="hs-comment">-- method.</span><span>
</span><span id="line-225"></span><span>         </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Program
-&gt; Verbosity -&gt; ProgramSearchPath -&gt; IO (Maybe (String, [String]))
</span><a href="Distribution.Simple.Program.Types.html#programFindLocation"><span class="hs-identifier hs-var hs-var">programFindLocation</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="#local-6989586621679718585"><span class="hs-identifier hs-var">tool</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718583"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramSearchPath
</span><a href="#local-6989586621679718582"><span class="hs-identifier hs-var">searchpath</span></a></span><span>
</span><span id="line-226"></span><span>         </span><span class="hs-special">(</span><span id="local-6989586621679718544"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718544"><span class="hs-identifier hs-var">fp</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718583"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;found &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718581"><span class="hs-identifier hs-var">toolname</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; in &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718544"><span class="hs-identifier hs-var">fp</span></a></span><span>
</span><span id="line-227"></span><span>                      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718543"><span class="annot"><span class="annottext">lookedAt :: [String]
</span><a href="#local-6989586621679718543"><span class="hs-identifier hs-var hs-var">lookedAt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((String, Bool) -&gt; String) -&gt; [(String, Bool)] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(String, Bool) -&gt; String
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span>
</span><span id="line-228"></span><span>                                   </span><span class="annot"><span class="annottext">([(String, Bool)] -&gt; [String])
-&gt; ([(String, Bool)] -&gt; [(String, Bool)])
-&gt; [(String, Bool)]
-&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((String, Bool) -&gt; Bool) -&gt; [(String, Bool)] -&gt; [(String, Bool)]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#takeWhile"><span class="hs-identifier hs-var">takeWhile</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679718541"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718541"><span class="hs-identifier hs-var">_file</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718540"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718540"><span class="hs-identifier hs-var">exist</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718540"><span class="hs-identifier hs-var">exist</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span>                                   </span><span class="annot"><span class="annottext">([(String, Bool)] -&gt; [String]) -&gt; [(String, Bool)] -&gt; [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [Bool] -&gt; [(String, Bool)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718550"><span class="hs-identifier hs-var">guesses</span></a></span><span> </span><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621679718547"><span class="hs-identifier hs-var">exists</span></a></span><span>
</span><span id="line-230"></span><span>                      </span><span class="annot"><span class="annottext">Maybe (String, [String]) -&gt; IO (Maybe (String, [String]))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(String, [String]) -&gt; Maybe (String, [String])
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718544"><span class="hs-identifier hs-var">fp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718543"><span class="hs-identifier hs-var">lookedAt</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621679718573"><span class="hs-identifier hs-type">takeVersionSuffix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-233"></span><span>        </span><span id="local-6989586621679718573"><span class="annot"><span class="annottext">takeVersionSuffix :: String -&gt; String
</span><a href="#local-6989586621679718573"><span class="hs-identifier hs-var hs-var">takeVersionSuffix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; String
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="Distribution.Utils.Generic.html#takeWhileEndLE"><span class="hs-identifier hs-var">takeWhileEndLE</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679718537"><span class="hs-identifier hs-var">isSuffixChar</span></a></span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span>        </span><span class="annot"><a href="#local-6989586621679718537"><span class="hs-identifier hs-type">isSuffixChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-236"></span><span>        </span><span id="local-6989586621679718537"><span class="annot"><span class="annottext">isSuffixChar :: Char -&gt; Bool
</span><a href="#local-6989586621679718537"><span class="hs-identifier hs-var hs-var">isSuffixChar</span></a></span></span><span> </span><span id="local-6989586621679718536"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679718536"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isDigit"><span class="hs-identifier hs-var">isDigit</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679718536"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679718536"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679718536"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getGhcInfo"><span class="hs-identifier hs-type">getGhcInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-239"></span><span id="getGhcInfo"><span class="annot"><span class="annottext">getGhcInfo :: Verbosity -&gt; ConfiguredProgram -&gt; IO [(String, String)]
</span><a href="Distribution.Simple.GHCJS.html#getGhcInfo"><span class="hs-identifier hs-var hs-var">getGhcInfo</span></a></span></span><span> </span><span id="local-6989586621679718533"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718533"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718532"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718532"><span class="hs-identifier hs-var">ghcjsProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; GhcImplInfo -&gt; ConfiguredProgram -&gt; IO [(String, String)]
</span><a href="Distribution.Simple.GHC.Internal.html#getGhcInfo"><span class="hs-identifier hs-var">Internal.getGhcInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718533"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679718531"><span class="hs-identifier hs-var">implInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718532"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-240"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-241"></span><span>    </span><span id="local-6989586621679718528"><span class="annot"><span class="annottext">version :: Version
</span><a href="#local-6989586621679718528"><span class="hs-identifier hs-var hs-var">version</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Maybe Version -&gt; Version
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Version
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS.getGhcInfo: no version&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe Version -&gt; Version) -&gt; Maybe Version -&gt; Version
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; Maybe Version
</span><a href="Distribution.Simple.Program.Types.html#programVersion"><span class="hs-identifier hs-var hs-var">programVersion</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718532"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-242"></span><span>    </span><span id="local-6989586621679718531"><span class="annot"><span class="annottext">implInfo :: GhcImplInfo
</span><a href="#local-6989586621679718531"><span class="hs-identifier hs-var hs-var">implInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; GhcImplInfo
</span><a href="Distribution.Simple.GHC.ImplInfo.html#ghcVersionImplInfo"><span class="hs-identifier hs-var">ghcVersionImplInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718528"><span class="hs-identifier hs-var">version</span></a></span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span class="hs-comment">-- | Given a single package DB, return all installed packages.</span><span>
</span><span id="line-245"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getPackageDBContents"><span class="hs-identifier hs-type">getPackageDBContents</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-246"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.PackageIndex.html#InstalledPackageIndex"><span class="hs-identifier hs-type">InstalledPackageIndex</span></a></span><span>
</span><span id="line-247"></span><span id="getPackageDBContents"><span class="annot"><span class="annottext">getPackageDBContents :: Verbosity -&gt; PackageDB -&gt; ProgramDb -&gt; IO InstalledPackageIndex
</span><a href="Distribution.Simple.GHCJS.html#getPackageDBContents"><span class="hs-identifier hs-var hs-var">getPackageDBContents</span></a></span></span><span> </span><span id="local-6989586621679718523"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718523"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718522"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679718522"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span id="local-6989586621679718521"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718521"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-248"></span><span>  </span><span id="local-6989586621679718520"><span class="annot"><span class="annottext">[(PackageDB, [InstalledPackageInfo])]
</span><a href="#local-6989586621679718520"><span class="hs-identifier hs-var">pkgss</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; [PackageDB]
-&gt; ProgramDb
-&gt; IO [(PackageDB, [InstalledPackageInfo])]
</span><a href="Distribution.Simple.GHCJS.html#getInstalledPackages%27"><span class="hs-identifier hs-var">getInstalledPackages'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718523"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679718522"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718521"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-249"></span><span>  </span><span class="annot"><span class="annottext">Verbosity
-&gt; [(PackageDB, [InstalledPackageInfo])]
-&gt; ProgramDb
-&gt; IO InstalledPackageIndex
</span><a href="Distribution.Simple.GHCJS.html#toPackageIndex"><span class="hs-identifier hs-var">toPackageIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718523"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[(PackageDB, [InstalledPackageInfo])]
</span><a href="#local-6989586621679718520"><span class="hs-identifier hs-var">pkgss</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718521"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span class="hs-comment">-- | Given a package DB stack, return all installed packages.</span><span>
</span><span id="line-252"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getInstalledPackages"><span class="hs-identifier hs-type">getInstalledPackages</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-253"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.PackageIndex.html#InstalledPackageIndex"><span class="hs-identifier hs-type">InstalledPackageIndex</span></a></span><span>
</span><span id="line-254"></span><span id="getInstalledPackages"><span class="annot"><span class="annottext">getInstalledPackages :: Verbosity -&gt; [PackageDB] -&gt; ProgramDb -&gt; IO InstalledPackageIndex
</span><a href="Distribution.Simple.GHCJS.html#getInstalledPackages"><span class="hs-identifier hs-var hs-var">getInstalledPackages</span></a></span></span><span> </span><span id="local-6989586621679718516"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718516"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718515"><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718515"><span class="hs-identifier hs-var">packagedbs</span></a></span></span><span> </span><span id="local-6989586621679718514"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718514"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-255"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#checkPackageDbEnvVar"><span class="hs-identifier hs-var">checkPackageDbEnvVar</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718516"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-256"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; [PackageDB] -&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#checkPackageDbStack"><span class="hs-identifier hs-var">checkPackageDbStack</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718516"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718515"><span class="hs-identifier hs-var">packagedbs</span></a></span><span>
</span><span id="line-257"></span><span>  </span><span id="local-6989586621679718511"><span class="annot"><span class="annottext">[(PackageDB, [InstalledPackageInfo])]
</span><a href="#local-6989586621679718511"><span class="hs-identifier hs-var">pkgss</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; [PackageDB]
-&gt; ProgramDb
-&gt; IO [(PackageDB, [InstalledPackageInfo])]
</span><a href="Distribution.Simple.GHCJS.html#getInstalledPackages%27"><span class="hs-identifier hs-var">getInstalledPackages'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718516"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718515"><span class="hs-identifier hs-var">packagedbs</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718514"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-258"></span><span>  </span><span id="local-6989586621679718510"><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679718510"><span class="hs-identifier hs-var">index</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; [(PackageDB, [InstalledPackageInfo])]
-&gt; ProgramDb
-&gt; IO InstalledPackageIndex
</span><a href="Distribution.Simple.GHCJS.html#toPackageIndex"><span class="hs-identifier hs-var">toPackageIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718516"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[(PackageDB, [InstalledPackageInfo])]
</span><a href="#local-6989586621679718511"><span class="hs-identifier hs-var">pkgss</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718514"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-259"></span><span>  </span><span class="annot"><span class="annottext">InstalledPackageIndex -&gt; IO InstalledPackageIndex
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(InstalledPackageIndex -&gt; IO InstalledPackageIndex)
-&gt; InstalledPackageIndex -&gt; IO InstalledPackageIndex
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
</span><a href="#local-6989586621679718510"><span class="hs-identifier hs-var">index</span></a></span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#toPackageIndex"><span class="hs-identifier hs-type">toPackageIndex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-262"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-263"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-264"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.PackageIndex.html#InstalledPackageIndex"><span class="hs-identifier hs-type">InstalledPackageIndex</span></a></span><span>
</span><span id="line-265"></span><span id="toPackageIndex"><span class="annot"><span class="annottext">toPackageIndex :: Verbosity
-&gt; [(PackageDB, [InstalledPackageInfo])]
-&gt; ProgramDb
-&gt; IO InstalledPackageIndex
</span><a href="Distribution.Simple.GHCJS.html#toPackageIndex"><span class="hs-identifier hs-var hs-var">toPackageIndex</span></a></span></span><span> </span><span id="local-6989586621679718508"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718508"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718507"><span class="annot"><span class="annottext">[(PackageDB, [InstalledPackageInfo])]
</span><a href="#local-6989586621679718507"><span class="hs-identifier hs-var">pkgss</span></a></span></span><span> </span><span id="local-6989586621679718506"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718506"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-266"></span><span>  </span><span class="hs-comment">-- On Windows, various fields have $topdir/foo rather than full</span><span>
</span><span id="line-267"></span><span>  </span><span class="hs-comment">-- paths. We need to substitute the right value in so that when</span><span>
</span><span id="line-268"></span><span>  </span><span class="hs-comment">-- we, for example, call gcc, we have proper paths to give it.</span><span>
</span><span id="line-269"></span><span>  </span><span id="local-6989586621679718505"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718505"><span class="hs-identifier hs-var">topDir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#getLibDir%27"><span class="hs-identifier hs-var">getLibDir'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718508"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718503"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-270"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718502"><span class="annot"><span class="annottext">indices :: [InstalledPackageIndex]
</span><a href="#local-6989586621679718502"><span class="hs-identifier hs-var hs-var">indices</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo] -&gt; InstalledPackageIndex
</span><a href="Distribution.Simple.PackageIndex.html#fromList"><span class="hs-identifier hs-var">PackageIndex.fromList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(InstalledPackageInfo -&gt; InstalledPackageInfo)
-&gt; [InstalledPackageInfo] -&gt; [InstalledPackageInfo]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; InstalledPackageInfo -&gt; InstalledPackageInfo
</span><a href="Distribution.Simple.GHC.Internal.html#substTopDir"><span class="hs-identifier hs-var">Internal.substTopDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718505"><span class="hs-identifier hs-var">topDir</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679718499"><span class="hs-identifier hs-var">pkgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDB
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718499"><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679718499"><span class="hs-identifier hs-var">pkgs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(PackageDB, [InstalledPackageInfo])]
</span><a href="#local-6989586621679718507"><span class="hs-identifier hs-var">pkgss</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-272"></span><span>  </span><span class="annot"><span class="annottext">InstalledPackageIndex -&gt; IO InstalledPackageIndex
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(InstalledPackageIndex -&gt; IO InstalledPackageIndex)
-&gt; InstalledPackageIndex -&gt; IO InstalledPackageIndex
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[InstalledPackageIndex] -&gt; InstalledPackageIndex
forall a. Monoid a =&gt; [a] -&gt; a
</span><a href="../../base/src/GHC.Base.html#mconcat"><span class="hs-identifier hs-var">mconcat</span></a></span><span> </span><span class="annot"><span class="annottext">[InstalledPackageIndex]
</span><a href="#local-6989586621679718502"><span class="hs-identifier hs-var">indices</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-275"></span><span>    </span><span id="local-6989586621679718503"><span class="annot"><span class="annottext">ghcjsProg :: ConfiguredProgram
</span><a href="#local-6989586621679718503"><span class="hs-identifier hs-var hs-var">ghcjsProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ConfiguredProgram
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS.toPackageIndex no ghcjs program&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe ConfiguredProgram -&gt; ConfiguredProgram)
-&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; Maybe ConfiguredProgram
</span><a href="Distribution.Simple.Program.Db.html#lookupProgram"><span class="hs-identifier hs-var">lookupProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718506"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getLibDir"><span class="hs-identifier hs-type">getLibDir</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-278"></span><span id="getLibDir"><span class="annot"><span class="annottext">getLibDir :: Verbosity -&gt; LocalBuildInfo -&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#getLibDir"><span class="hs-identifier hs-var hs-var">getLibDir</span></a></span></span><span> </span><span id="local-6989586621679718495"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718495"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718494"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718494"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-279"></span><span>    </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; String
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="Distribution.Utils.Generic.html#dropWhileEndLE"><span class="hs-identifier hs-var">dropWhileEndLE</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; IO String -&gt; IO String
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span>
</span><span id="line-280"></span><span>     </span><span class="annot"><span class="annottext">Verbosity -&gt; Program -&gt; ProgramDb -&gt; [String] -&gt; IO String
</span><a href="Distribution.Simple.Program.html#getDbProgramOutput"><span class="hs-identifier hs-var">getDbProgramOutput</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718495"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span>
</span><span id="line-281"></span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718494"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--print-libdir&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-282"></span><span>
</span><span id="line-283"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getLibDir%27"><span class="hs-identifier hs-type">getLibDir'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-284"></span><span id="getLibDir%27"><span class="annot"><span class="annottext">getLibDir' :: Verbosity -&gt; ConfiguredProgram -&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#getLibDir%27"><span class="hs-identifier hs-var hs-var">getLibDir'</span></a></span></span><span> </span><span id="local-6989586621679718489"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718489"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718488"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718488"><span class="hs-identifier hs-var">ghcjsProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-285"></span><span>    </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; String
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="Distribution.Utils.Generic.html#dropWhileEndLE"><span class="hs-identifier hs-var">dropWhileEndLE</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; IO String -&gt; IO String
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span>
</span><span id="line-286"></span><span>     </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; [String] -&gt; IO String
</span><a href="Distribution.Simple.Program.html#getProgramOutput"><span class="hs-identifier hs-var">getProgramOutput</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718489"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718488"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--print-libdir&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span class="hs-comment">-- | Return the 'FilePath' to the global GHC package database.</span><span>
</span><span id="line-290"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getGlobalPackageDB"><span class="hs-identifier hs-type">getGlobalPackageDB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-291"></span><span id="getGlobalPackageDB"><span class="annot"><span class="annottext">getGlobalPackageDB :: Verbosity -&gt; ConfiguredProgram -&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#getGlobalPackageDB"><span class="hs-identifier hs-var hs-var">getGlobalPackageDB</span></a></span></span><span> </span><span id="local-6989586621679718486"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718486"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718485"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718485"><span class="hs-identifier hs-var">ghcProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-292"></span><span>    </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; String
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="Distribution.Utils.Generic.html#dropWhileEndLE"><span class="hs-identifier hs-var">dropWhileEndLE</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; IO String -&gt; IO String
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span>
</span><span id="line-293"></span><span>     </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; [String] -&gt; IO String
</span><a href="Distribution.Simple.Program.html#getProgramOutput"><span class="hs-identifier hs-var">getProgramOutput</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718486"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718485"><span class="hs-identifier hs-var">ghcProg</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--print-global-package-db&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span class="hs-comment">-- | Return the 'FilePath' to the per-user GHC package database.</span><span>
</span><span id="line-296"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getUserPackageDB"><span class="hs-identifier hs-type">getUserPackageDB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Types.html#ConfiguredProgram"><span class="hs-identifier hs-type">ConfiguredProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-297"></span><span id="getUserPackageDB"><span class="annot"><span class="annottext">getUserPackageDB :: Verbosity -&gt; ConfiguredProgram -&gt; Platform -&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#getUserPackageDB"><span class="hs-identifier hs-var hs-var">getUserPackageDB</span></a></span></span><span> </span><span id="local-6989586621679718483"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718483"><span class="hs-identifier hs-var">_verbosity</span></a></span></span><span> </span><span id="local-6989586621679718482"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718482"><span class="hs-identifier hs-var">ghcjsProg</span></a></span></span><span> </span><span id="local-6989586621679718481"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718481"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-298"></span><span>    </span><span class="hs-comment">-- It's rather annoying that we have to reconstruct this, because ghc</span><span>
</span><span id="line-299"></span><span>    </span><span class="hs-comment">-- hides this information from us otherwise. But for certain use cases</span><span>
</span><span id="line-300"></span><span>    </span><span class="hs-comment">-- like change monitoring it really can't remain hidden.</span><span>
</span><span id="line-301"></span><span>    </span><span id="local-6989586621679718480"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718480"><span class="hs-identifier hs-var">appdir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="../../directory/src/System.Directory.html#getAppUserDataDirectory"><span class="hs-identifier hs-var">getAppUserDataDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghcjs&quot;</span></span><span>
</span><span id="line-302"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; IO String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718480"><span class="hs-identifier hs-var">appdir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718479"><span class="hs-identifier hs-var">platformAndVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718478"><span class="hs-identifier hs-var">packageConfFileName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-304"></span><span>    </span><span id="local-6989586621679718479"><span class="annot"><span class="annottext">platformAndVersion :: String
</span><a href="#local-6989586621679718479"><span class="hs-identifier hs-var hs-var">platformAndVersion</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Version -&gt; String
</span><a href="Distribution.Simple.GHC.Internal.html#ghcPlatformAndVersionString"><span class="hs-identifier hs-var">Internal.ghcPlatformAndVersionString</span></a></span><span>
</span><span id="line-305"></span><span>                           </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718481"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679718477"><span class="hs-identifier hs-var">ghcjsVersion</span></a></span><span>
</span><span id="line-306"></span><span>    </span><span id="local-6989586621679718478"><span class="annot"><span class="annottext">packageConfFileName :: String
</span><a href="#local-6989586621679718478"><span class="hs-identifier hs-var hs-var">packageConfFileName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;package.conf.d&quot;</span></span><span>
</span><span id="line-307"></span><span>    </span><span id="local-6989586621679718477"><span class="annot"><span class="annottext">ghcjsVersion :: Version
</span><a href="#local-6989586621679718477"><span class="hs-identifier hs-var hs-var">ghcjsVersion</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Maybe Version -&gt; Version
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Version
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS.getUserPackageDB: no version&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe Version -&gt; Version) -&gt; Maybe Version -&gt; Version
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; Maybe Version
</span><a href="Distribution.Simple.Program.Types.html#programVersion"><span class="hs-identifier hs-var hs-var">programVersion</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718482"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#checkPackageDbEnvVar"><span class="hs-identifier hs-type">checkPackageDbEnvVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-310"></span><span id="checkPackageDbEnvVar"><span class="annot"><span class="annottext">checkPackageDbEnvVar :: Verbosity -&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#checkPackageDbEnvVar"><span class="hs-identifier hs-var hs-var">checkPackageDbEnvVar</span></a></span></span><span> </span><span id="local-6989586621679718474"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718474"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-311"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.GHC.Internal.html#checkPackageDbEnvVar"><span class="hs-identifier hs-var">Internal.checkPackageDbEnvVar</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718474"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS_PACKAGE_PATH&quot;</span></span><span>
</span><span id="line-312"></span><span>
</span><span id="line-313"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#checkPackageDbStack"><span class="hs-identifier hs-type">checkPackageDbStack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-314"></span><span id="checkPackageDbStack"><span class="annot"><span class="annottext">checkPackageDbStack :: Verbosity -&gt; [PackageDB] -&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#checkPackageDbStack"><span class="hs-identifier hs-var hs-var">checkPackageDbStack</span></a></span></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679718471"><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718471"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-315"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; [PackageDB] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#notElem"><span class="hs-operator hs-var">`notElem`</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718471"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-316"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#checkPackageDbStack"><span class="hs-identifier hs-var">checkPackageDbStack</span></a></span><span> </span><span id="local-6989586621679718469"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718469"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718468"><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718468"><span class="hs-identifier hs-var">rest</span></a></span></span><span>
</span><span id="line-317"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; [PackageDB] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#notElem"><span class="hs-operator hs-var">`notElem`</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718468"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-318"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718469"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;With current ghc versions the global package db is always used &quot;</span></span><span>
</span><span id="line-319"></span><span>     </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;and must be listed first. This ghc limitation may be lifted in &quot;</span></span><span>
</span><span id="line-320"></span><span>     </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;future, see https://gitlab.haskell.org/ghc/ghc/-/issues/5977&quot;</span></span><span>
</span><span id="line-321"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#checkPackageDbStack"><span class="hs-identifier hs-var">checkPackageDbStack</span></a></span><span> </span><span id="local-6989586621679718467"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718467"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-322"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718467"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;If the global package db is specified, it must be &quot;</span></span><span>
</span><span id="line-323"></span><span>     </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;specified first and cannot be specified multiple times&quot;</span></span><span>
</span><span id="line-324"></span><span>
</span><span id="line-325"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getInstalledPackages%27"><span class="hs-identifier hs-type">getInstalledPackages'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-326"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-327"></span><span id="getInstalledPackages%27"><span class="annot"><span class="annottext">getInstalledPackages' :: Verbosity
-&gt; [PackageDB]
-&gt; ProgramDb
-&gt; IO [(PackageDB, [InstalledPackageInfo])]
</span><a href="Distribution.Simple.GHCJS.html#getInstalledPackages%27"><span class="hs-identifier hs-var hs-var">getInstalledPackages'</span></a></span></span><span> </span><span id="local-6989586621679718466"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718466"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718465"><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718465"><span class="hs-identifier hs-var">packagedbs</span></a></span></span><span> </span><span id="local-6989586621679718464"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718464"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-328"></span><span>  </span><span class="annot"><span class="annottext">[IO (PackageDB, [InstalledPackageInfo])]
-&gt; IO [(PackageDB, [InstalledPackageInfo])]
forall (t :: * -&gt; *) (f :: * -&gt; *) a.
(Traversable t, Applicative f) =&gt;
t (f a) -&gt; f (t a)
</span><a href="../../base/src/Data.Traversable.html#sequenceA"><span class="hs-identifier hs-var">sequenceA</span></a></span><span>
</span><span id="line-329"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679718462"><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679718462"><span class="hs-identifier hs-var">pkgs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo -&gt; Verbosity -&gt; PackageDB -&gt; IO [InstalledPackageInfo]
</span><a href="Distribution.Simple.Program.HcPkg.html#dump"><span class="hs-identifier hs-var">HcPkg.dump</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ProgramDb -&gt; HcPkgInfo
</span><a href="Distribution.Simple.GHCJS.html#hcPkgInfo"><span class="hs-identifier hs-var">hcPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718464"><span class="hs-identifier hs-var">progdb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718466"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679718460"><span class="hs-identifier hs-var">packagedb</span></a></span><span>
</span><span id="line-330"></span><span>         </span><span class="annot"><span class="annottext">(PackageDB, [InstalledPackageInfo])
-&gt; IO (PackageDB, [InstalledPackageInfo])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679718460"><span class="hs-identifier hs-var">packagedb</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[InstalledPackageInfo]
</span><a href="#local-6989586621679718462"><span class="hs-identifier hs-var">pkgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-331"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679718460"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679718460"><span class="hs-identifier hs-var">packagedb</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718465"><span class="hs-identifier hs-var">packagedbs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-332"></span><span>
</span><span id="line-333"></span><span class="hs-comment">-- | Get the packages from specific PackageDBs, not cumulative.</span><span>
</span><span id="line-334"></span><span class="hs-comment">--</span><span>
</span><span id="line-335"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getInstalledPackagesMonitorFiles"><span class="hs-identifier hs-type">getInstalledPackagesMonitorFiles</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-336"></span><span>                                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-337"></span><span>                                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-338"></span><span>                                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-339"></span><span id="getInstalledPackagesMonitorFiles"><span class="annot"><span class="annottext">getInstalledPackagesMonitorFiles :: Verbosity -&gt; Platform -&gt; ProgramDb -&gt; [PackageDB] -&gt; IO [String]
</span><a href="Distribution.Simple.GHCJS.html#getInstalledPackagesMonitorFiles"><span class="hs-identifier hs-var hs-var">getInstalledPackagesMonitorFiles</span></a></span></span><span> </span><span id="local-6989586621679718459"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718459"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718458"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718458"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621679718457"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718457"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-340"></span><span>    </span><span class="annot"><span class="annottext">(PackageDB -&gt; IO String) -&gt; [PackageDB] -&gt; IO [String]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; IO String
</span><a href="#local-6989586621679718456"><span class="hs-identifier hs-var">getPackageDBPath</span></a></span><span>
</span><span id="line-341"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-342"></span><span>    </span><span class="annot"><a href="#local-6989586621679718456"><span class="hs-identifier hs-type">getPackageDBPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-343"></span><span>    </span><span id="local-6989586621679718456"><span class="annot"><span class="annottext">getPackageDBPath :: PackageDB -&gt; IO String
</span><a href="#local-6989586621679718456"><span class="hs-identifier hs-var hs-var">getPackageDBPath</span></a></span></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-344"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="#local-6989586621679718455"><span class="hs-identifier hs-var">selectMonitorFile</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO String) -&gt; IO String -&gt; IO String
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#getGlobalPackageDB"><span class="hs-identifier hs-var">getGlobalPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718459"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718453"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-345"></span><span>
</span><span id="line-346"></span><span>    </span><span class="annot"><a href="#local-6989586621679718456"><span class="hs-identifier hs-var">getPackageDBPath</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#UserPackageDB"><span class="hs-identifier hs-var">UserPackageDB</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-347"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="#local-6989586621679718455"><span class="hs-identifier hs-var">selectMonitorFile</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO String) -&gt; IO String -&gt; IO String
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; Platform -&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#getUserPackageDB"><span class="hs-identifier hs-var">getUserPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718459"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718453"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718458"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-348"></span><span>
</span><span id="line-349"></span><span>    </span><span class="annot"><a href="#local-6989586621679718456"><span class="hs-identifier hs-var">getPackageDBPath</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-type">SpecificPackageDB</span></a></span><span> </span><span id="local-6989586621679718450"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718450"><span class="hs-identifier hs-var">path</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="#local-6989586621679718455"><span class="hs-identifier hs-var">selectMonitorFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718450"><span class="hs-identifier hs-var">path</span></a></span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span>    </span><span class="hs-comment">-- GHC has old style file dbs, and new style directory dbs.</span><span>
</span><span id="line-352"></span><span>    </span><span class="hs-comment">-- Note that for dir style dbs, we only need to monitor the cache file, not</span><span>
</span><span id="line-353"></span><span>    </span><span class="hs-comment">-- the whole directory. The ghc program itself only reads the cache file</span><span>
</span><span id="line-354"></span><span>    </span><span class="hs-comment">-- so it's safe to only monitor this one file.</span><span>
</span><span id="line-355"></span><span>    </span><span id="local-6989586621679718455"><span class="annot"><span class="annottext">selectMonitorFile :: String -&gt; IO String
</span><a href="#local-6989586621679718455"><span class="hs-identifier hs-var hs-var">selectMonitorFile</span></a></span></span><span> </span><span id="local-6989586621679718446"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718446"><span class="hs-identifier hs-var">path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-356"></span><span>      </span><span id="local-6989586621679718445"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718445"><span class="hs-identifier hs-var">isFileStyle</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718446"><span class="hs-identifier hs-var">path</span></a></span><span>
</span><span id="line-357"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718445"><span class="hs-identifier hs-var">isFileStyle</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718446"><span class="hs-identifier hs-var">path</span></a></span><span>
</span><span id="line-358"></span><span>                     </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718446"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;package.cache&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span>    </span><span id="local-6989586621679718453"><span class="annot"><span class="annottext">ghcjsProg :: ConfiguredProgram
</span><a href="#local-6989586621679718453"><span class="hs-identifier hs-var hs-var">ghcjsProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ConfiguredProgram
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS.toPackageIndex no ghcjs program&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe ConfiguredProgram -&gt; ConfiguredProgram)
-&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; Maybe ConfiguredProgram
</span><a href="Distribution.Simple.Program.Db.html#lookupProgram"><span class="hs-identifier hs-var">lookupProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718457"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-361"></span><span>
</span><span id="line-362"></span><span>
</span><span id="line-363"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#toJSLibName"><span class="hs-identifier hs-type">toJSLibName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-364"></span><span id="toJSLibName"><span class="annot"><span class="annottext">toJSLibName :: String -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#toJSLibName"><span class="hs-identifier hs-var hs-var">toJSLibName</span></a></span></span><span> </span><span id="local-6989586621679718441"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718441"><span class="hs-identifier hs-var">lib</span></a></span></span><span>
</span><span id="line-365"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718441"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.dll&quot;</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.dylib&quot;</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.so&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-366"></span><span>                              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-identifier hs-var">replaceExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718441"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_so&quot;</span></span><span>
</span><span id="line-367"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718441"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.a&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-identifier hs-var">replaceExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718441"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_a&quot;</span></span><span>
</span><span id="line-368"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718441"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_a&quot;</span></span><span>
</span><span id="line-369"></span><span>
</span><span id="line-370"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-371"></span><span class="hs-comment">-- Building a library</span><span>
</span><span id="line-372"></span><span>
</span><span id="line-373"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#buildLib"><span class="hs-identifier hs-type">buildLib</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-374"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-375"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-376"></span><span id="buildLib"><span class="annot"><span class="annottext">buildLib :: Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#buildLib"><span class="hs-identifier hs-var hs-var">buildLib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [String]
-&gt; Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#buildOrReplLib"><span class="hs-identifier hs-var">buildOrReplLib</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [String]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#replLib"><span class="hs-identifier hs-type">replLib</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-379"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-380"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-381"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-382"></span><span id="replLib"><span class="annot"><span class="annottext">replLib :: [String]
-&gt; Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#replLib"><span class="hs-identifier hs-var hs-var">replLib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [String]
-&gt; Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#buildOrReplLib"><span class="hs-identifier hs-var">buildOrReplLib</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe [String]
 -&gt; Verbosity
 -&gt; Flag (Maybe Int)
 -&gt; PackageDescription
 -&gt; LocalBuildInfo
 -&gt; Library
 -&gt; ComponentLocalBuildInfo
 -&gt; IO ())
-&gt; ([String] -&gt; Maybe [String])
-&gt; [String]
-&gt; Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Maybe [String]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#buildOrReplLib"><span class="hs-identifier hs-type">buildOrReplLib</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-385"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-386"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-387"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-388"></span><span id="buildOrReplLib"><span class="annot"><span class="annottext">buildOrReplLib :: Maybe [String]
-&gt; Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#buildOrReplLib"><span class="hs-identifier hs-var hs-var">buildOrReplLib</span></a></span></span><span> </span><span id="local-6989586621679718438"><span class="annot"><span class="annottext">Maybe [String]
</span><a href="#local-6989586621679718438"><span class="hs-identifier hs-var">mReplFlags</span></a></span></span><span> </span><span id="local-6989586621679718437"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718437"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718436"><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718436"><span class="hs-identifier hs-var">numJobs</span></a></span></span><span> </span><span id="local-6989586621679718435"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718435"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679718434"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679718433"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679718433"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679718432"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-389"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718431"><span class="annot"><span class="annottext">uid :: UnitId
</span><a href="#local-6989586621679718431"><span class="hs-identifier hs-var hs-var">uid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; UnitId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentUnitId"><span class="hs-identifier hs-var hs-var">componentUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-390"></span><span>      </span><span id="local-6989586621679718429"><span class="annot"><span class="annottext">libTargetDir :: String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var hs-var">libTargetDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.LocalBuildInfo.html#componentBuildDir"><span class="hs-identifier hs-var">componentBuildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-391"></span><span>      </span><span id="local-6989586621679718425"><span class="annot"><span class="annottext">whenVanillaLib :: Bool -&gt; f () -&gt; f ()
</span><a href="#local-6989586621679718425"><span class="hs-identifier hs-var hs-var">whenVanillaLib</span></a></span></span><span> </span><span id="local-6989586621679718424"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718424"><span class="hs-identifier hs-var">forceVanilla</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-392"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; f () -&gt; f ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718424"><span class="hs-identifier hs-var">forceVanilla</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withVanillaLib"><span class="hs-identifier hs-var hs-var">withVanillaLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-393"></span><span>      </span><span id="local-6989586621679718421"><span class="annot"><span class="annottext">whenProfLib :: IO () -&gt; IO ()
</span><a href="#local-6989586621679718421"><span class="hs-identifier hs-var hs-var">whenProfLib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withProfLib"><span class="hs-identifier hs-var hs-var">withProfLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-394"></span><span>      </span><span id="local-6989586621679718417"><span class="annot"><span class="annottext">whenSharedLib :: Bool -&gt; f () -&gt; f ()
</span><a href="#local-6989586621679718417"><span class="hs-identifier hs-var hs-var">whenSharedLib</span></a></span></span><span> </span><span id="local-6989586621679718416"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718416"><span class="hs-identifier hs-var">forceShared</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-395"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; f () -&gt; f ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718416"><span class="hs-identifier hs-var">forceShared</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withSharedLib"><span class="hs-identifier hs-var hs-var">withSharedLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-396"></span><span>      </span><span id="local-6989586621679718412"><span class="annot"><span class="annottext">whenStaticLib :: Bool -&gt; f () -&gt; f ()
</span><a href="#local-6989586621679718412"><span class="hs-identifier hs-var hs-var">whenStaticLib</span></a></span></span><span> </span><span id="local-6989586621679718411"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718411"><span class="hs-identifier hs-var">forceStatic</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-397"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; f () -&gt; f ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718411"><span class="hs-identifier hs-var">forceStatic</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withStaticLib"><span class="hs-identifier hs-var hs-var">withStaticLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-398"></span><span>      </span><span class="hs-comment">-- whenGHCiLib = when (withGHCiLib lbi)</span><span>
</span><span id="line-399"></span><span>      </span><span id="local-6989586621679718409"><span class="annot"><span class="annottext">forRepl :: Bool
</span><a href="#local-6989586621679718409"><span class="hs-identifier hs-var hs-var">forRepl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ([String] -&gt; Bool) -&gt; Maybe [String] -&gt; Bool
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; [String] -&gt; Bool
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe [String]
</span><a href="#local-6989586621679718438"><span class="hs-identifier hs-var">mReplFlags</span></a></span><span>
</span><span id="line-400"></span><span>      </span><span class="hs-comment">-- ifReplLib = when forRepl</span><span>
</span><span id="line-401"></span><span>      </span><span id="local-6989586621679718406"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679718406"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-402"></span><span>      </span><span id="local-6989586621679718404"><span class="annot"><span class="annottext">implInfo :: GhcImplInfo
</span><a href="#local-6989586621679718404"><span class="hs-identifier hs-var hs-var">implInfo</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; GhcImplInfo
</span><a href="Distribution.Simple.GHC.ImplInfo.html#getImplInfo"><span class="hs-identifier hs-var">getImplInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718406"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-403"></span><span>      </span><span id="local-6989586621679718403"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621679718403"><span class="hs-identifier hs-var">platform</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span id="local-6989586621679718401"><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621679718401"><span class="hs-identifier hs-var">_hostArch</span></a></span></span><span> </span><span id="local-6989586621679718400"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718400"><span class="hs-identifier hs-var">_hostOS</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-404"></span><span>      </span><span id="local-6989586621679718398"><span class="annot"><span class="annottext">has_code :: Bool
</span><a href="#local-6989586621679718398"><span class="hs-identifier hs-var hs-var">has_code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentIsIndefinite"><span class="hs-identifier hs-var">componentIsIndefinite</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-405"></span><span>
</span><span id="line-406"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679718396"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718396"><span class="hs-identifier hs-var">ghcjsProg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program -&gt; ProgramDb -&gt; IO (ConfiguredProgram, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgram"><span class="hs-identifier hs-var">requireProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718437"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-407"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718394"><span class="annot"><span class="annottext">runGhcjsProg :: GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718394"><span class="hs-identifier hs-var hs-var">runGhcjsProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; ConfiguredProgram -&gt; Compiler -&gt; Platform -&gt; GhcOptions -&gt; IO ()
</span><a href="Distribution.Simple.Program.GHC.html#runGHC"><span class="hs-identifier hs-var">runGHC</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718437"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718396"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718406"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718403"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-408"></span><span>
</span><span id="line-409"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718392"><span class="annot"><span class="annottext">libBi :: BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var hs-var">libBi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679718433"><span class="hs-identifier hs-var">lib</span></a></span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span>  </span><span class="hs-comment">-- fixme flags shouldn't depend on ghcjs being dynamic or not</span><span>
</span><span id="line-412"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718390"><span class="annot"><span class="annottext">isGhcjsDynamic :: Bool
</span><a href="#local-6989586621679718390"><span class="hs-identifier hs-var hs-var">isGhcjsDynamic</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#isDynamic"><span class="hs-identifier hs-var">isDynamic</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718406"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-413"></span><span>      </span><span id="local-6989586621679718389"><span class="annot"><span class="annottext">dynamicTooSupported :: Bool
</span><a href="#local-6989586621679718389"><span class="hs-identifier hs-var hs-var">dynamicTooSupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#supportsDynamicToo"><span class="hs-identifier hs-var">supportsDynamicToo</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718406"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-414"></span><span>      </span><span id="local-6989586621679718387"><span class="annot"><span class="annottext">doingTH :: Bool
</span><a href="#local-6989586621679718387"><span class="hs-identifier hs-var hs-var">doingTH</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="Distribution.Types.BuildInfo.html#usesTemplateHaskellOrQQ"><span class="hs-identifier hs-var">usesTemplateHaskellOrQQ</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span>
</span><span id="line-415"></span><span>      </span><span id="local-6989586621679718385"><span class="annot"><span class="annottext">forceVanillaLib :: Bool
</span><a href="#local-6989586621679718385"><span class="hs-identifier hs-var hs-var">forceVanillaLib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718387"><span class="hs-identifier hs-var">doingTH</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718390"><span class="hs-identifier hs-var">isGhcjsDynamic</span></a></span><span>
</span><span id="line-416"></span><span>      </span><span id="local-6989586621679718383"><span class="annot"><span class="annottext">forceSharedLib :: Bool
</span><a href="#local-6989586621679718383"><span class="hs-identifier hs-var hs-var">forceSharedLib</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718387"><span class="hs-identifier hs-var">doingTH</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>     </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718390"><span class="hs-identifier hs-var">isGhcjsDynamic</span></a></span><span>
</span><span id="line-417"></span><span>      </span><span class="hs-comment">-- TH always needs default libs, even when building for profiling</span><span>
</span><span id="line-418"></span><span>
</span><span id="line-419"></span><span>  </span><span class="hs-comment">-- Determine if program coverage should be enabled and if so, what</span><span>
</span><span id="line-420"></span><span>  </span><span class="hs-comment">-- '-hpcdir' should be.</span><span>
</span><span id="line-421"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718382"><span class="annot"><span class="annottext">isCoverageEnabled :: Bool
</span><a href="#local-6989586621679718382"><span class="hs-identifier hs-var hs-var">isCoverageEnabled</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#libCoverage"><span class="hs-identifier hs-var hs-var">libCoverage</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-422"></span><span>      </span><span class="hs-comment">-- TODO: Historically HPC files have been put into a directory which</span><span>
</span><span id="line-423"></span><span>      </span><span class="hs-comment">-- has the package name.  I'm going to avoid changing this for</span><span>
</span><span id="line-424"></span><span>      </span><span class="hs-comment">-- now, but it would probably be better for this to be the</span><span>
</span><span id="line-425"></span><span>      </span><span class="hs-comment">-- component ID instead...</span><span>
</span><span id="line-426"></span><span>      </span><span id="local-6989586621679718378"><span class="annot"><span class="annottext">pkg_name :: String
</span><a href="#local-6989586621679718378"><span class="hs-identifier hs-var hs-var">pkg_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
</span><a href="Distribution.Types.PackageDescription.html#package"><span class="hs-identifier hs-var hs-var">PD.package</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718435"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-427"></span><span>      </span><span id="local-6989586621679718374"><span class="annot"><span class="annottext">distPref :: String
</span><a href="#local-6989586621679718374"><span class="hs-identifier hs-var hs-var">distPref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String -&gt; String
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(Flag String -&gt; String) -&gt; Flag String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConfigFlags -&gt; Flag String
</span><a href="Distribution.Simple.Setup.html#configDistPref"><span class="hs-identifier hs-var hs-var">configDistPref</span></a></span><span> </span><span class="annot"><span class="annottext">(ConfigFlags -&gt; Flag String) -&gt; ConfigFlags -&gt; Flag String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ConfigFlags
</span><a href="Distribution.Types.LocalBuildInfo.html#configFlags"><span class="hs-identifier hs-var hs-var">configFlags</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-428"></span><span>      </span><span id="local-6989586621679718367"><span class="annot"><span class="annottext">hpcdir :: Way -&gt; Flag String
</span><a href="#local-6989586621679718367"><span class="hs-identifier hs-var hs-var">hpcdir</span></a></span></span><span> </span><span id="local-6989586621679718366"><span class="annot"><span class="annottext">Way
</span><a href="#local-6989586621679718366"><span class="hs-identifier hs-var">way</span></a></span></span><span>
</span><span id="line-429"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718409"><span class="hs-identifier hs-var">forRepl</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>  </span><span class="hs-comment">-- HPC is not supported in ghci</span><span>
</span><span id="line-430"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718382"><span class="hs-identifier hs-var">isCoverageEnabled</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Flag String) -&gt; String -&gt; Flag String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Way -&gt; String -&gt; String
</span><a href="Distribution.Simple.Hpc.html#mixDir"><span class="hs-identifier hs-var">Hpc.mixDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718374"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="#local-6989586621679718366"><span class="hs-identifier hs-var">way</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718378"><span class="hs-identifier hs-var">pkg_name</span></a></span><span>
</span><span id="line-431"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-432"></span><span>
</span><span id="line-433"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#createDirectoryIfMissingVerbose"><span class="hs-identifier hs-var">createDirectoryIfMissingVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718437"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span>
</span><span id="line-434"></span><span>  </span><span class="hs-comment">-- TODO: do we need to put hs-boot files into place for mutually recursive</span><span>
</span><span id="line-435"></span><span>  </span><span class="hs-comment">-- modules?</span><span>
</span><span id="line-436"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718356"><span class="annot"><span class="annottext">cLikeFiles :: [String]
</span><a href="#local-6989586621679718356"><span class="hs-identifier hs-var hs-var">cLikeFiles</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NubListR String -&gt; [String]
forall a. NubListR a -&gt; [a]
</span><a href="Distribution.Utils.NubList.html#fromNubListR"><span class="hs-identifier hs-var hs-var">fromNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">(NubListR String -&gt; [String]) -&gt; NubListR String -&gt; [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NubListR String -&gt; NubListR String -&gt; NubListR String
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-437"></span><span>      </span><span id="local-6989586621679718351"><span class="annot"><span class="annottext">jsSrcs :: [String]
</span><a href="#local-6989586621679718351"><span class="hs-identifier hs-var hs-var">jsSrcs</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#jsSources"><span class="hs-identifier hs-var hs-var">jsSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span>
</span><span id="line-438"></span><span>      </span><span id="local-6989586621679718349"><span class="annot"><span class="annottext">cObjs :: [String]
</span><a href="#local-6989586621679718349"><span class="hs-identifier hs-var hs-var">cObjs</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-operator hs-var">`replaceExtension`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#objExtension"><span class="hs-identifier hs-var">objExtension</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718356"><span class="hs-identifier hs-var">cLikeFiles</span></a></span><span>
</span><span id="line-439"></span><span>      </span><span id="local-6989586621679718347"><span class="annot"><span class="annottext">baseOpts :: GhcOptions
</span><a href="#local-6989586621679718347"><span class="hs-identifier hs-var hs-var">baseOpts</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; LocalBuildInfo
-&gt; BuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; GhcOptions
</span><a href="Distribution.Simple.GHCJS.html#componentGhcOptions"><span class="hs-identifier hs-var">componentGhcOptions</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718437"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span>
</span><span id="line-440"></span><span>      </span><span id="local-6989586621679718345"><span class="annot"><span class="annottext">linkJsLibOpts :: GhcOptions
</span><a href="#local-6989586621679718345"><span class="hs-identifier hs-var hs-var">linkJsLibOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-441"></span><span>                        </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-442"></span><span>                          </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-link-js-lib&quot;</span></span><span>     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; String
</span><a href="Distribution.Types.UnitId.html#getHSLibraryName"><span class="hs-identifier hs-var">getHSLibraryName</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679718431"><span class="hs-identifier hs-var">uid</span></a></span><span>
</span><span id="line-443"></span><span>                          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-js-lib-outputdir&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-444"></span><span>                          </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718351"><span class="hs-identifier hs-var">jsSrcs</span></a></span><span>
</span><span id="line-445"></span><span>                      </span><span class="hs-special">}</span><span>
</span><span id="line-446"></span><span>      </span><span id="local-6989586621679718338"><span class="annot"><span class="annottext">vanillaOptsNoJsLib :: GhcOptions
</span><a href="#local-6989586621679718338"><span class="hs-identifier hs-var hs-var">vanillaOptsNoJsLib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718347"><span class="hs-identifier hs-var">baseOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-447"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptMode :: Flag GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptMode"><span class="hs-identifier hs-var">ghcOptMode</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcMode -&gt; Flag GhcMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcModeMake"><span class="hs-identifier hs-var">GhcModeMake</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-448"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptNumJobs :: Flag (Maybe Int)
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptNumJobs"><span class="hs-identifier hs-var">ghcOptNumJobs</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718436"><span class="hs-identifier hs-var">numJobs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-449"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptInputModules :: NubListR ModuleName
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptInputModules"><span class="hs-identifier hs-var">ghcOptInputModules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; NubListR ModuleName
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([ModuleName] -&gt; NubListR ModuleName)
-&gt; [ModuleName] -&gt; NubListR ModuleName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; ComponentLocalBuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.LocalBuildInfo.html#allLibModules"><span class="hs-identifier hs-var">allLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679718433"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-450"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHPCDir :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHPCDir"><span class="hs-identifier hs-var">ghcOptHPCDir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718367"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Vanilla"><span class="hs-identifier hs-var">Hpc.Vanilla</span></a></span><span>
</span><span id="line-451"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-452"></span><span>      </span><span id="local-6989586621679718329"><span class="annot"><span class="annottext">vanillaOpts :: GhcOptions
</span><a href="#local-6989586621679718329"><span class="hs-identifier hs-var hs-var">vanillaOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718338"><span class="hs-identifier hs-var">vanillaOptsNoJsLib</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718345"><span class="hs-identifier hs-var">linkJsLibOpts</span></a></span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span>      </span><span id="local-6989586621679718326"><span class="annot"><span class="annottext">profOpts :: GhcOptions
</span><a href="#local-6989586621679718326"><span class="hs-identifier hs-var hs-var">profOpts</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; GhcOptions -&gt; GhcOptions
</span><a href="Distribution.Simple.GHCJS.html#adjustExts"><span class="hs-identifier hs-var">adjustExts</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;p_hi&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;p_o&quot;</span></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718329"><span class="hs-identifier hs-var">vanillaOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-455"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptProfilingMode :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptProfilingMode"><span class="hs-identifier hs-var">ghcOptProfilingMode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-456"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptProfilingAuto :: Flag GhcProfAuto
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptProfilingAuto"><span class="hs-identifier hs-var">ghcOptProfilingAuto</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ProfDetailLevel -&gt; Flag GhcProfAuto
</span><a href="Distribution.Simple.GHC.Internal.html#profDetailLevelFlag"><span class="hs-identifier hs-var">Internal.profDetailLevelFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-457"></span><span>                                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProfDetailLevel
</span><a href="Distribution.Types.LocalBuildInfo.html#withProfLibDetail"><span class="hs-identifier hs-var hs-var">withProfLibDetail</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-458"></span><span>                    </span><span class="hs-comment">--  ghcOptHiSuffix      = toFlag &quot;p_hi&quot;,</span><span>
</span><span id="line-459"></span><span>                    </span><span class="hs-comment">--  ghcOptObjSuffix     = toFlag &quot;p_o&quot;,</span><span>
</span><span id="line-460"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcProfOptions"><span class="hs-identifier hs-var">hcProfOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-461"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHPCDir :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHPCDir"><span class="hs-identifier hs-var">ghcOptHPCDir</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718367"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Prof"><span class="hs-identifier hs-var">Hpc.Prof</span></a></span><span>
</span><span id="line-462"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-463"></span><span>
</span><span id="line-464"></span><span>      </span><span id="local-6989586621679718316"><span class="annot"><span class="annottext">sharedOpts :: GhcOptions
</span><a href="#local-6989586621679718316"><span class="hs-identifier hs-var hs-var">sharedOpts</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; GhcOptions -&gt; GhcOptions
</span><a href="Distribution.Simple.GHCJS.html#adjustExts"><span class="hs-identifier hs-var">adjustExts</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dyn_hi&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dyn_o&quot;</span></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718329"><span class="hs-identifier hs-var">vanillaOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-465"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptDynLinkMode :: Flag GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynLinkMode"><span class="hs-identifier hs-var">ghcOptDynLinkMode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode -&gt; Flag GhcDynLinkMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcDynamicOnly"><span class="hs-identifier hs-var">GhcDynamicOnly</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-466"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptFPic :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptFPic"><span class="hs-identifier hs-var">ghcOptFPic</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-467"></span><span>                    </span><span class="hs-comment">--  ghcOptHiSuffix    = toFlag &quot;dyn_hi&quot;,</span><span>
</span><span id="line-468"></span><span>                    </span><span class="hs-comment">--  ghcOptObjSuffix   = toFlag &quot;dyn_o&quot;,</span><span>
</span><span id="line-469"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcSharedOptions"><span class="hs-identifier hs-var">hcSharedOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-470"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHPCDir :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHPCDir"><span class="hs-identifier hs-var">ghcOptHPCDir</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718367"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Dyn"><span class="hs-identifier hs-var">Hpc.Dyn</span></a></span><span>
</span><span id="line-471"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-472"></span><span>
</span><span id="line-473"></span><span>      </span><span id="local-6989586621679718308"><span class="annot"><span class="annottext">vanillaSharedOpts :: GhcOptions
</span><a href="#local-6989586621679718308"><span class="hs-identifier hs-var hs-var">vanillaSharedOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718329"><span class="hs-identifier hs-var">vanillaOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-474"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptDynLinkMode :: Flag GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynLinkMode"><span class="hs-identifier hs-var">ghcOptDynLinkMode</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode -&gt; Flag GhcDynLinkMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcStaticAndDynamic"><span class="hs-identifier hs-var">GhcStaticAndDynamic</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-475"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptDynHiSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynHiSuffix"><span class="hs-identifier hs-var">ghcOptDynHiSuffix</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_dyn_hi&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-476"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptDynObjSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynObjSuffix"><span class="hs-identifier hs-var">ghcOptDynObjSuffix</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_dyn_o&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-477"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHPCDir :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHPCDir"><span class="hs-identifier hs-var">ghcOptHPCDir</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718367"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Dyn"><span class="hs-identifier hs-var">Hpc.Dyn</span></a></span><span>
</span><span id="line-478"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-479"></span><span>
</span><span id="line-480"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718409"><span class="hs-identifier hs-var">forRepl</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; ComponentLocalBuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.LocalBuildInfo.html#allLibModules"><span class="hs-identifier hs-var">allLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679718433"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718351"><span class="hs-identifier hs-var">jsSrcs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718349"><span class="hs-identifier hs-var">cObjs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-481"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718303"><span class="annot"><span class="annottext">vanilla :: IO ()
</span><a href="#local-6989586621679718303"><span class="hs-identifier hs-var hs-var">vanilla</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="#local-6989586621679718425"><span class="hs-identifier hs-var">whenVanillaLib</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718385"><span class="hs-identifier hs-var">forceVanillaLib</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718394"><span class="hs-identifier hs-var">runGhcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718329"><span class="hs-identifier hs-var">vanillaOpts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-482"></span><span>           </span><span id="local-6989586621679718301"><span class="annot"><span class="annottext">shared :: IO ()
</span><a href="#local-6989586621679718301"><span class="hs-identifier hs-var hs-var">shared</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="#local-6989586621679718417"><span class="hs-identifier hs-var">whenSharedLib</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718383"><span class="hs-identifier hs-var">forceSharedLib</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718394"><span class="hs-identifier hs-var">runGhcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718316"><span class="hs-identifier hs-var">sharedOpts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-483"></span><span>           </span><span id="local-6989586621679718299"><span class="annot"><span class="annottext">useDynToo :: Bool
</span><a href="#local-6989586621679718299"><span class="hs-identifier hs-var hs-var">useDynToo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718389"><span class="hs-identifier hs-var">dynamicTooSupported</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-484"></span><span>                       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718385"><span class="hs-identifier hs-var">forceVanillaLib</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withVanillaLib"><span class="hs-identifier hs-var hs-var">withVanillaLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-485"></span><span>                       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718383"><span class="hs-identifier hs-var">forceSharedLib</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withSharedLib"><span class="hs-identifier hs-var hs-var">withSharedLib</span></a></span><span>  </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-486"></span><span>                       </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcSharedOptions"><span class="hs-identifier hs-var">hcSharedOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-487"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718398"><span class="hs-identifier hs-var">has_code</span></a></span><span>
</span><span id="line-488"></span><span>        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">IO ()
</span><a href="#local-6989586621679718303"><span class="hs-identifier hs-var">vanilla</span></a></span><span>
</span><span id="line-489"></span><span>        </span><span class="hs-keyword">else</span><span>
</span><span id="line-490"></span><span>         </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718299"><span class="hs-identifier hs-var">useDynToo</span></a></span><span>
</span><span id="line-491"></span><span>          </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-492"></span><span>              </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718394"><span class="hs-identifier hs-var">runGhcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718308"><span class="hs-identifier hs-var">vanillaSharedOpts</span></a></span><span>
</span><span id="line-493"></span><span>              </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718367"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Dyn"><span class="hs-identifier hs-var">Hpc.Dyn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718367"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Vanilla"><span class="hs-identifier hs-var">Hpc.Vanilla</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-494"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span id="local-6989586621679718297"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718297"><span class="hs-identifier hs-var">dynDir</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span id="local-6989586621679718296"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718296"><span class="hs-identifier hs-var">vanillaDir</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-495"></span><span>                    </span><span class="hs-comment">-- When the vanilla and shared library builds are done</span><span>
</span><span id="line-496"></span><span>                    </span><span class="hs-comment">-- in one pass, only one set of HPC module interfaces</span><span>
</span><span id="line-497"></span><span>                    </span><span class="hs-comment">-- are generated. This set should suffice for both</span><span>
</span><span id="line-498"></span><span>                    </span><span class="hs-comment">-- static and dynamically linked executables. We copy</span><span>
</span><span id="line-499"></span><span>                    </span><span class="hs-comment">-- the modules interfaces so they are available under</span><span>
</span><span id="line-500"></span><span>                    </span><span class="hs-comment">-- both ways.</span><span>
</span><span id="line-501"></span><span>                    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#copyDirectoryRecursive"><span class="hs-identifier hs-var">copyDirectoryRecursive</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718437"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718297"><span class="hs-identifier hs-var">dynDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718296"><span class="hs-identifier hs-var">vanillaDir</span></a></span><span>
</span><span id="line-502"></span><span>                </span><span class="annot"><span class="annottext">(Flag String, Flag String)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-503"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718390"><span class="hs-identifier hs-var">isGhcjsDynamic</span></a></span><span>
</span><span id="line-504"></span><span>            </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">IO ()
</span><a href="#local-6989586621679718301"><span class="hs-identifier hs-var">shared</span></a></span><span class="hs-special">;</span><span>  </span><span class="annot"><span class="annottext">IO ()
</span><a href="#local-6989586621679718303"><span class="hs-identifier hs-var">vanilla</span></a></span><span>
</span><span id="line-505"></span><span>            </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">IO ()
</span><a href="#local-6989586621679718303"><span class="hs-identifier hs-var">vanilla</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">IO ()
</span><a href="#local-6989586621679718301"><span class="hs-identifier hs-var">shared</span></a></span><span>
</span><span id="line-506"></span><span>       </span><span class="annot"><span class="annottext">IO () -&gt; IO ()
</span><a href="#local-6989586621679718421"><span class="hs-identifier hs-var">whenProfLib</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718394"><span class="hs-identifier hs-var">runGhcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718326"><span class="hs-identifier hs-var">profOpts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-507"></span><span>
</span><span id="line-508"></span><span>  </span><span class="hs-comment">-- Build any C++ sources separately.</span><span>
</span><span id="line-509"></span><span>  </span><span class="hs-comment">{-
  unless (not has_code || null (cxxSources libBi) || not nativeToo) $ do
    info verbosity &quot;Building C++ Sources...&quot;
    sequence_
      [ do let baseCxxOpts    = Internal.componentCxxGhcOptions verbosity implInfo
                                lbi libBi clbi libTargetDir filename
               vanillaCxxOpts = if isGhcjsDynamic
                                then baseCxxOpts { ghcOptFPic = toFlag True }
                                else baseCxxOpts
               profCxxOpts    = vanillaCxxOpts `mappend` mempty {
                                  ghcOptProfilingMode = toFlag True,
                                  ghcOptObjSuffix     = toFlag &quot;p_o&quot;
                                }
               sharedCxxOpts  = vanillaCxxOpts `mappend` mempty {
                                 ghcOptFPic        = toFlag True,
                                 ghcOptDynLinkMode = toFlag GhcDynamicOnly,
                                 ghcOptObjSuffix   = toFlag &quot;dyn_o&quot;
                               }
               odir           = fromFlag (ghcOptObjDir vanillaCxxOpts)
           createDirectoryIfMissingVerbose verbosity True odir
           let runGhcProgIfNeeded cxxOpts = do
                 needsRecomp &lt;- checkNeedsRecompilation filename cxxOpts
                 when needsRecomp $ runGhcjsProg cxxOpts
           runGhcProgIfNeeded vanillaCxxOpts
           unless forRepl $
             whenSharedLib forceSharedLib (runGhcProgIfNeeded sharedCxxOpts)
           unless forRepl $ whenProfLib   (runGhcProgIfNeeded   profCxxOpts)
      | filename &lt;- cxxSources libBi]

  ifReplLib $ do
    when (null (allLibModules lib clbi)) $ warn verbosity &quot;No exposed modules&quot;
    ifReplLib (runGhcjsProg replOpts)
-}</span><span>
</span><span id="line-542"></span><span>  </span><span class="hs-comment">-- build any C sources</span><span>
</span><span id="line-543"></span><span>  </span><span class="hs-comment">-- TODO: Add support for S and CMM files.</span><span>
</span><span id="line-544"></span><span>  </span><span class="hs-comment">{-
  unless (not has_code || null (cSources libBi) || not nativeToo) $ do
    info verbosity &quot;Building C Sources...&quot;
    sequence_
      [ do let baseCcOpts    = Internal.componentCcGhcOptions verbosity implInfo
                               lbi libBi clbi libTargetDir filename
               vanillaCcOpts = if isGhcjsDynamic
                               -- Dynamic GHC requires C sources to be built
                               -- with -fPIC for REPL to work. See #2207.
                               then baseCcOpts { ghcOptFPic = toFlag True }
                               else baseCcOpts
               profCcOpts    = vanillaCcOpts `mappend` mempty {
                                 ghcOptProfilingMode = toFlag True,
                                 ghcOptObjSuffix     = toFlag &quot;p_o&quot;
                               }
               sharedCcOpts  = vanillaCcOpts `mappend` mempty {
                                 ghcOptFPic        = toFlag True,
                                 ghcOptDynLinkMode = toFlag GhcDynamicOnly,
                                 ghcOptObjSuffix   = toFlag &quot;dyn_o&quot;
                               }
               odir          = fromFlag (ghcOptObjDir vanillaCcOpts)
           createDirectoryIfMissingVerbose verbosity True odir
           let runGhcProgIfNeeded ccOpts = do
                 needsRecomp &lt;- checkNeedsRecompilation filename ccOpts
                 when needsRecomp $ runGhcjsProg ccOpts
           runGhcProgIfNeeded vanillaCcOpts
           unless forRepl $
             whenSharedLib forceSharedLib (runGhcProgIfNeeded sharedCcOpts)
           unless forRepl $ whenProfLib (runGhcProgIfNeeded profCcOpts)
      | filename &lt;- cSources libBi]
-}</span><span>
</span><span id="line-575"></span><span>  </span><span class="hs-comment">-- TODO: problem here is we need the .c files built first, so we can load them</span><span>
</span><span id="line-576"></span><span>  </span><span class="hs-comment">-- with ghci, but .c files can depend on .h files generated by ghc by ffi</span><span>
</span><span id="line-577"></span><span>  </span><span class="hs-comment">-- exports.</span><span>
</span><span id="line-578"></span><span>
</span><span id="line-579"></span><span>  </span><span class="hs-comment">-- link:</span><span>
</span><span id="line-580"></span><span>
</span><span id="line-581"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718398"><span class="hs-identifier hs-var">has_code</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; (IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-comment">{- fixme nativeToo -}</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; (IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718409"><span class="hs-identifier hs-var">forRepl</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-582"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718437"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Linking...&quot;</span></span><span>
</span><span id="line-583"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718294"><span class="annot"><span class="annottext">cSharedObjs :: [String]
</span><a href="#local-6989586621679718294"><span class="hs-identifier hs-var hs-var">cSharedObjs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-operator hs-var">`replaceExtension`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dyn_&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#objExtension"><span class="hs-identifier hs-var">objExtension</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-584"></span><span>                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-585"></span><span>        </span><span id="local-6989586621679718293"><span class="annot"><span class="annottext">compiler_id :: CompilerId
</span><a href="#local-6989586621679718293"><span class="hs-identifier hs-var hs-var">compiler_id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-586"></span><span>        </span><span id="local-6989586621679718292"><span class="annot"><span class="annottext">sharedLibFilePath :: String
</span><a href="#local-6989586621679718292"><span class="hs-identifier hs-var hs-var">sharedLibFilePath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; CompilerId -&gt; UnitId -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#mkSharedLibName"><span class="hs-identifier hs-var">mkSharedLibName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CompilerId
</span><a href="#local-6989586621679718293"><span class="hs-identifier hs-var">compiler_id</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679718431"><span class="hs-identifier hs-var">uid</span></a></span><span>
</span><span id="line-587"></span><span>        </span><span id="local-6989586621679718290"><span class="annot"><span class="annottext">staticLibFilePath :: String
</span><a href="#local-6989586621679718290"><span class="hs-identifier hs-var hs-var">staticLibFilePath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; CompilerId -&gt; UnitId -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#mkStaticLibName"><span class="hs-identifier hs-var">mkStaticLibName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CompilerId
</span><a href="#local-6989586621679718293"><span class="hs-identifier hs-var">compiler_id</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679718431"><span class="hs-identifier hs-var">uid</span></a></span><span>
</span><span id="line-588"></span><span>
</span><span id="line-589"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718288"><span class="annot"><span class="annottext">stubObjs :: [a]
</span><a href="#local-6989586621679718288"><span class="hs-identifier hs-var hs-var">stubObjs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-590"></span><span>        </span><span id="local-6989586621679718287"><span class="annot"><span class="annottext">stubSharedObjs :: [a]
</span><a href="#local-6989586621679718287"><span class="hs-identifier hs-var hs-var">stubSharedObjs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-591"></span><span>
</span><span id="line-592"></span><span class="hs-comment">{-
    stubObjs &lt;- catMaybes &lt;$&gt; sequenceA
      [ findFileWithExtension [objExtension] [libTargetDir]
          (ModuleName.toFilePath x ++&quot;_stub&quot;)
      | ghcVersion &lt; mkVersion [7,2] -- ghc-7.2+ does not make _stub.o files
      , x &lt;- allLibModules lib clbi ]
    stubProfObjs &lt;- catMaybes &lt;$&gt; sequenceA
      [ findFileWithExtension [&quot;p_&quot; ++ objExtension] [libTargetDir]
          (ModuleName.toFilePath x ++&quot;_stub&quot;)
      | ghcVersion &lt; mkVersion [7,2] -- ghc-7.2+ does not make _stub.o files
      , x &lt;- allLibModules lib clbi ]
    stubSharedObjs &lt;- catMaybes &lt;$&gt; sequenceA
      [ findFileWithExtension [&quot;dyn_&quot; ++ objExtension] [libTargetDir]
          (ModuleName.toFilePath x ++&quot;_stub&quot;)
      | ghcVersion &lt; mkVersion [7,2] -- ghc-7.2+ does not make _stub.o files
      , x &lt;- allLibModules lib clbi ]
-}</span><span>
</span><span id="line-609"></span><span>    </span><span id="local-6989586621679718286"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718286"><span class="hs-identifier hs-var">hObjs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; String
-&gt; Bool
-&gt; IO [String]
</span><a href="Distribution.Simple.GHC.Internal.html#getHaskellObjects"><span class="hs-identifier hs-var">Internal.getHaskellObjects</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679718404"><span class="hs-identifier hs-var">implInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679718433"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-610"></span><span>               </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#objExtension"><span class="hs-identifier hs-var">objExtension</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-611"></span><span>    </span><span id="local-6989586621679718284"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718284"><span class="hs-identifier hs-var">hSharedObjs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-612"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withSharedLib"><span class="hs-identifier hs-var hs-var">withSharedLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-613"></span><span>              </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
-&gt; Library
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; String
-&gt; Bool
-&gt; IO [String]
</span><a href="Distribution.Simple.GHC.Internal.html#getHaskellObjects"><span class="hs-identifier hs-var">Internal.getHaskellObjects</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679718404"><span class="hs-identifier hs-var">implInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679718433"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-614"></span><span>                      </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dyn_&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#objExtension"><span class="hs-identifier hs-var">objExtension</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-615"></span><span>              </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; IO [String]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-616"></span><span>
</span><span id="line-617"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718286"><span class="hs-identifier hs-var">hObjs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718349"><span class="hs-identifier hs-var">cObjs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[Any] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Any]
forall a. [a]
</span><a href="#local-6989586621679718288"><span class="hs-identifier hs-var">stubObjs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-618"></span><span>      </span><span id="local-6989586621679718283"><span class="annot"><span class="annottext">NubListR String
</span><a href="#local-6989586621679718283"><span class="hs-identifier hs-var">rpaths</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; IO (NubListR String)
</span><a href="Distribution.Simple.GHCJS.html#getRPaths"><span class="hs-identifier hs-var">getRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-619"></span><span>
</span><span id="line-620"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718281"><span class="annot"><span class="annottext">staticObjectFiles :: [String]
</span><a href="#local-6989586621679718281"><span class="hs-identifier hs-var hs-var">staticObjectFiles</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-621"></span><span>                 </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718286"><span class="hs-identifier hs-var">hObjs</span></a></span><span>
</span><span id="line-622"></span><span>              </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718349"><span class="hs-identifier hs-var">cObjs</span></a></span><span>
</span><span id="line-623"></span><span>              </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
forall a. [a]
</span><a href="#local-6989586621679718288"><span class="hs-identifier hs-var">stubObjs</span></a></span><span>
</span><span id="line-624"></span><span>          </span><span id="local-6989586621679718280"><span class="annot"><span class="annottext">dynamicObjectFiles :: [String]
</span><a href="#local-6989586621679718280"><span class="hs-identifier hs-var hs-var">dynamicObjectFiles</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-625"></span><span>                 </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718284"><span class="hs-identifier hs-var">hSharedObjs</span></a></span><span>
</span><span id="line-626"></span><span>              </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718429"><span class="hs-identifier hs-var">libTargetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718294"><span class="hs-identifier hs-var">cSharedObjs</span></a></span><span>
</span><span id="line-627"></span><span>              </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
forall a. [a]
</span><a href="#local-6989586621679718287"><span class="hs-identifier hs-var">stubSharedObjs</span></a></span><span>
</span><span id="line-628"></span><span>          </span><span class="hs-comment">-- After the relocation lib is created we invoke ghc -shared</span><span>
</span><span id="line-629"></span><span>          </span><span class="hs-comment">-- with the dependencies spelled out as -package arguments</span><span>
</span><span id="line-630"></span><span>          </span><span class="hs-comment">-- and ghc invokes the linker with the proper library paths</span><span>
</span><span id="line-631"></span><span>          </span><span id="local-6989586621679718263"><span class="annot"><span class="annottext">ghcSharedLinkArgs :: GhcOptions
</span><a href="#local-6989586621679718263"><span class="hs-identifier hs-var hs-var">ghcSharedLinkArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-632"></span><span>              </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-633"></span><span>                </span><span class="annot"><span class="annottext">ghcOptShared :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptShared"><span class="hs-identifier hs-var">ghcOptShared</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-634"></span><span>                </span><span class="annot"><span class="annottext">ghcOptDynLinkMode :: Flag GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynLinkMode"><span class="hs-identifier hs-var">ghcOptDynLinkMode</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode -&gt; Flag GhcDynLinkMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcDynamicOnly"><span class="hs-identifier hs-var">GhcDynamicOnly</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-635"></span><span>                </span><span class="annot"><span class="annottext">ghcOptInputFiles :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptInputFiles"><span class="hs-identifier hs-var">ghcOptInputFiles</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718280"><span class="hs-identifier hs-var">dynamicObjectFiles</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-636"></span><span>                </span><span class="annot"><span class="annottext">ghcOptOutputFile :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptOutputFile"><span class="hs-identifier hs-var">ghcOptOutputFile</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718292"><span class="hs-identifier hs-var">sharedLibFilePath</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-637"></span><span>                </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcSharedOptions"><span class="hs-identifier hs-var">hcSharedOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-638"></span><span>                </span><span class="hs-comment">-- For dynamic libs, Mac OS/X needs to know the install location</span><span>
</span><span id="line-639"></span><span>                </span><span class="hs-comment">-- at build time. This only applies to GHC &lt; 7.8 - see the</span><span>
</span><span id="line-640"></span><span>                </span><span class="hs-comment">-- discussion in #1660.</span><span>
</span><span id="line-641"></span><span>            </span><span class="hs-comment">{-
                ghcOptDylibName          = if hostOS == OSX
                                              &amp;&amp; ghcVersion &lt; mkVersion [7,8]
                                            then toFlag sharedLibInstallPath
                                            else mempty, -}</span><span>
</span><span id="line-646"></span><span>                </span><span class="annot"><span class="annottext">ghcOptHideAllPackages :: Flag Bool
</span><a href="#local-6989586621679718259"><span class="hs-identifier hs-var">ghcOptHideAllPackages</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-647"></span><span>                </span><span class="annot"><span class="annottext">ghcOptNoAutoLinkPackages :: Flag Bool
</span><a href="#local-6989586621679718258"><span class="hs-identifier hs-var">ghcOptNoAutoLinkPackages</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-648"></span><span>                </span><span class="annot"><span class="annottext">ghcOptPackageDBs :: [PackageDB]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptPackageDBs"><span class="hs-identifier hs-var">ghcOptPackageDBs</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; [PackageDB]
</span><a href="Distribution.Types.LocalBuildInfo.html#withPackageDB"><span class="hs-identifier hs-var hs-var">withPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-649"></span><span>                </span><span class="annot"><span class="annottext">ghcOptThisUnitId :: Flag String
</span><a href="#local-6989586621679718255"><span class="hs-identifier hs-var">ghcOptThisUnitId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-650"></span><span>                    </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#LibComponentLocalBuildInfo"><span class="hs-identifier hs-type">LibComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">componentCompatPackageKey :: ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentCompatPackageKey"><span class="hs-identifier hs-var">componentCompatPackageKey</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718252"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718252"><span class="hs-identifier hs-var">pk</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-651"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718252"><span class="hs-identifier hs-var">pk</span></a></span><span>
</span><span id="line-652"></span><span>                    </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Flag String
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-653"></span><span>                </span><span class="annot"><span class="annottext">ghcOptThisComponentId :: Flag ComponentId
</span><a href="#local-6989586621679718251"><span class="hs-identifier hs-var">ghcOptThisComponentId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-654"></span><span>                    </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#LibComponentLocalBuildInfo"><span class="hs-identifier hs-type">LibComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">componentInstantiatedWith :: ComponentLocalBuildInfo -&gt; [(ModuleName, OpenModule)]
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentInstantiatedWith"><span class="hs-identifier hs-var">componentInstantiatedWith</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718249"><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718249"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-655"></span><span>                        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718249"><span class="hs-identifier hs-var">insts</span></a></span><span>
</span><span id="line-656"></span><span>                            </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Flag ComponentId
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-657"></span><span>                            </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">ComponentId -&gt; Flag ComponentId
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; ComponentId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentComponentId"><span class="hs-identifier hs-var hs-var">componentComponentId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-658"></span><span>                    </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Flag ComponentId
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-659"></span><span>                </span><span class="annot"><span class="annottext">ghcOptInstantiatedWith :: [(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718247"><span class="hs-identifier hs-var">ghcOptInstantiatedWith</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-660"></span><span>                    </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#LibComponentLocalBuildInfo"><span class="hs-identifier hs-type">LibComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">componentInstantiatedWith :: ComponentLocalBuildInfo -&gt; [(ModuleName, OpenModule)]
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentInstantiatedWith"><span class="hs-identifier hs-var">componentInstantiatedWith</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718246"><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718246"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-661"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718246"><span class="hs-identifier hs-var">insts</span></a></span><span>
</span><span id="line-662"></span><span>                    </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-663"></span><span>                </span><span class="annot"><span class="annottext">ghcOptPackages :: NubListR (OpenUnitId, ModuleRenaming)
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptPackages"><span class="hs-identifier hs-var">ghcOptPackages</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(OpenUnitId, ModuleRenaming)]
-&gt; NubListR (OpenUnitId, ModuleRenaming)
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([(OpenUnitId, ModuleRenaming)]
 -&gt; NubListR (OpenUnitId, ModuleRenaming))
-&gt; [(OpenUnitId, ModuleRenaming)]
-&gt; NubListR (OpenUnitId, ModuleRenaming)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-664"></span><span>                                           </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; [(OpenUnitId, ModuleRenaming)]
</span><a href="Distribution.Simple.GHC.Internal.html#mkGhcOptPackages"><span class="hs-identifier hs-var">Internal.mkGhcOptPackages</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-special">,</span><span>
</span><span id="line-665"></span><span>                </span><span class="annot"><span class="annottext">ghcOptLinkLibs :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkLibs"><span class="hs-identifier hs-var">ghcOptLinkLibs</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibs"><span class="hs-identifier hs-var hs-var">extraLibs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-666"></span><span>                </span><span class="annot"><span class="annottext">ghcOptLinkLibPath :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkLibPath"><span class="hs-identifier hs-var">ghcOptLinkLibPath</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; NubListR String) -&gt; [String] -&gt; NubListR String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibDirs"><span class="hs-identifier hs-var hs-var">extraLibDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-667"></span><span>                </span><span class="annot"><span class="annottext">ghcOptLinkFrameworks :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkFrameworks"><span class="hs-identifier hs-var">ghcOptLinkFrameworks</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; NubListR String) -&gt; [String] -&gt; NubListR String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#frameworks"><span class="hs-identifier hs-var hs-var">PD.frameworks</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-668"></span><span>                </span><span class="annot"><span class="annottext">ghcOptLinkFrameworkDirs :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkFrameworkDirs"><span class="hs-identifier hs-var">ghcOptLinkFrameworkDirs</span></a></span><span>  </span><span class="hs-glyph">=</span><span>
</span><span id="line-669"></span><span>                  </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; NubListR String) -&gt; [String] -&gt; NubListR String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraFrameworkDirs"><span class="hs-identifier hs-var hs-var">PD.extraFrameworkDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-670"></span><span>                </span><span class="annot"><span class="annottext">ghcOptRPaths :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptRPaths"><span class="hs-identifier hs-var">ghcOptRPaths</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NubListR String
</span><a href="#local-6989586621679718283"><span class="hs-identifier hs-var">rpaths</span></a></span><span>
</span><span id="line-671"></span><span>              </span><span class="hs-special">}</span><span>
</span><span id="line-672"></span><span>          </span><span id="local-6989586621679718223"><span class="annot"><span class="annottext">ghcStaticLinkArgs :: GhcOptions
</span><a href="#local-6989586621679718223"><span class="hs-identifier hs-var hs-var">ghcStaticLinkArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-673"></span><span>              </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-674"></span><span>                </span><span class="annot"><span class="annottext">ghcOptStaticLib :: Flag Bool
</span><a href="#local-6989586621679718222"><span class="hs-identifier hs-var">ghcOptStaticLib</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-675"></span><span>                </span><span class="annot"><span class="annottext">ghcOptInputFiles :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptInputFiles"><span class="hs-identifier hs-var">ghcOptInputFiles</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718281"><span class="hs-identifier hs-var">staticObjectFiles</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-676"></span><span>                </span><span class="annot"><span class="annottext">ghcOptOutputFile :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptOutputFile"><span class="hs-identifier hs-var">ghcOptOutputFile</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718290"><span class="hs-identifier hs-var">staticLibFilePath</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-677"></span><span>                </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcStaticOptions"><span class="hs-identifier hs-var">hcStaticOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-678"></span><span>                </span><span class="annot"><span class="annottext">ghcOptHideAllPackages :: Flag Bool
</span><a href="#local-6989586621679718259"><span class="hs-identifier hs-var">ghcOptHideAllPackages</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-679"></span><span>                </span><span class="annot"><span class="annottext">ghcOptNoAutoLinkPackages :: Flag Bool
</span><a href="#local-6989586621679718258"><span class="hs-identifier hs-var">ghcOptNoAutoLinkPackages</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-680"></span><span>                </span><span class="annot"><span class="annottext">ghcOptPackageDBs :: [PackageDB]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptPackageDBs"><span class="hs-identifier hs-var">ghcOptPackageDBs</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; [PackageDB]
</span><a href="Distribution.Types.LocalBuildInfo.html#withPackageDB"><span class="hs-identifier hs-var hs-var">withPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718434"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-681"></span><span>                </span><span class="annot"><span class="annottext">ghcOptThisUnitId :: Flag String
</span><a href="#local-6989586621679718255"><span class="hs-identifier hs-var">ghcOptThisUnitId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-682"></span><span>                    </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#LibComponentLocalBuildInfo"><span class="hs-identifier hs-type">LibComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">componentCompatPackageKey :: ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentCompatPackageKey"><span class="hs-identifier hs-var">componentCompatPackageKey</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718220"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718220"><span class="hs-identifier hs-var">pk</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-683"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718220"><span class="hs-identifier hs-var">pk</span></a></span><span>
</span><span id="line-684"></span><span>                    </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Flag String
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-685"></span><span>                </span><span class="annot"><span class="annottext">ghcOptThisComponentId :: Flag ComponentId
</span><a href="#local-6989586621679718251"><span class="hs-identifier hs-var">ghcOptThisComponentId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-686"></span><span>                    </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#LibComponentLocalBuildInfo"><span class="hs-identifier hs-type">LibComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">componentInstantiatedWith :: ComponentLocalBuildInfo -&gt; [(ModuleName, OpenModule)]
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentInstantiatedWith"><span class="hs-identifier hs-var">componentInstantiatedWith</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718219"><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718219"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-687"></span><span>                        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718219"><span class="hs-identifier hs-var">insts</span></a></span><span>
</span><span id="line-688"></span><span>                            </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Flag ComponentId
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-689"></span><span>                            </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">ComponentId -&gt; Flag ComponentId
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; ComponentId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentComponentId"><span class="hs-identifier hs-var hs-var">componentComponentId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-690"></span><span>                    </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Flag ComponentId
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-691"></span><span>                </span><span class="annot"><span class="annottext">ghcOptInstantiatedWith :: [(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718247"><span class="hs-identifier hs-var">ghcOptInstantiatedWith</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-692"></span><span>                    </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#LibComponentLocalBuildInfo"><span class="hs-identifier hs-type">LibComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">componentInstantiatedWith :: ComponentLocalBuildInfo -&gt; [(ModuleName, OpenModule)]
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentInstantiatedWith"><span class="hs-identifier hs-var">componentInstantiatedWith</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718218"><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718218"><span class="hs-identifier hs-var">insts</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-693"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679718218"><span class="hs-identifier hs-var">insts</span></a></span><span>
</span><span id="line-694"></span><span>                    </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-695"></span><span>                </span><span class="annot"><span class="annottext">ghcOptPackages :: NubListR (OpenUnitId, ModuleRenaming)
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptPackages"><span class="hs-identifier hs-var">ghcOptPackages</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(OpenUnitId, ModuleRenaming)]
-&gt; NubListR (OpenUnitId, ModuleRenaming)
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([(OpenUnitId, ModuleRenaming)]
 -&gt; NubListR (OpenUnitId, ModuleRenaming))
-&gt; [(OpenUnitId, ModuleRenaming)]
-&gt; NubListR (OpenUnitId, ModuleRenaming)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-696"></span><span>                                           </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; [(OpenUnitId, ModuleRenaming)]
</span><a href="Distribution.Simple.GHC.Internal.html#mkGhcOptPackages"><span class="hs-identifier hs-var">Internal.mkGhcOptPackages</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718432"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-special">,</span><span>
</span><span id="line-697"></span><span>                </span><span class="annot"><span class="annottext">ghcOptLinkLibs :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkLibs"><span class="hs-identifier hs-var">ghcOptLinkLibs</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibs"><span class="hs-identifier hs-var hs-var">extraLibs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-698"></span><span>                </span><span class="annot"><span class="annottext">ghcOptLinkLibPath :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkLibPath"><span class="hs-identifier hs-var">ghcOptLinkLibPath</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; NubListR String) -&gt; [String] -&gt; NubListR String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibDirs"><span class="hs-identifier hs-var hs-var">extraLibDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718392"><span class="hs-identifier hs-var">libBi</span></a></span><span>
</span><span id="line-699"></span><span>              </span><span class="hs-special">}</span><span>
</span><span id="line-700"></span><span>
</span><span id="line-701"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718437"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NubListR (OpenUnitId, ModuleRenaming) -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcOptions -&gt; NubListR (OpenUnitId, ModuleRenaming)
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptPackages"><span class="hs-identifier hs-var hs-var">ghcOptPackages</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718263"><span class="hs-identifier hs-var">ghcSharedLinkArgs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-702"></span><span class="hs-comment">{-
      whenVanillaLib False $ do
        Ar.createArLibArchive verbosity lbi vanillaLibFilePath staticObjectFiles
        whenGHCiLib $ do
          (ldProg, _) &lt;- requireProgram verbosity ldProgram (withPrograms lbi)
          Ld.combineObjectFiles verbosity lbi ldProg
            ghciLibFilePath staticObjectFiles
            -}</span><span>
</span><span id="line-710"></span><span class="hs-comment">{-
      whenProfLib $ do
        Ar.createArLibArchive verbosity lbi profileLibFilePath profObjectFiles
        whenGHCiLib $ do
          (ldProg, _) &lt;- requireProgram verbosity ldProgram (withPrograms lbi)
          Ld.combineObjectFiles verbosity lbi ldProg
            ghciProfLibFilePath profObjectFiles
-}</span><span>
</span><span id="line-718"></span><span>      </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="#local-6989586621679718417"><span class="hs-identifier hs-var">whenSharedLib</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-719"></span><span>        </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718394"><span class="hs-identifier hs-var">runGhcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718263"><span class="hs-identifier hs-var">ghcSharedLinkArgs</span></a></span><span>
</span><span id="line-720"></span><span>
</span><span id="line-721"></span><span>      </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="#local-6989586621679718412"><span class="hs-identifier hs-var">whenStaticLib</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-722"></span><span>        </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718394"><span class="hs-identifier hs-var">runGhcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718223"><span class="hs-identifier hs-var">ghcStaticLinkArgs</span></a></span><span>
</span><span id="line-723"></span><span>
</span><span id="line-724"></span><span class="hs-comment">-- | Start a REPL without loading any source files.</span><span>
</span><span id="line-725"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#startInterpreter"><span class="hs-identifier hs-type">startInterpreter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-726"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-727"></span><span id="startInterpreter"><span class="annot"><span class="annottext">startInterpreter :: Verbosity
-&gt; ProgramDb -&gt; Compiler -&gt; Platform -&gt; [PackageDB] -&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#startInterpreter"><span class="hs-identifier hs-var hs-var">startInterpreter</span></a></span></span><span> </span><span id="local-6989586621679718217"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718217"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718216"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718216"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679718215"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718215"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679718214"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718214"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621679718213"><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718213"><span class="hs-identifier hs-var">packageDBs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-728"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718211"><span class="annot"><span class="annottext">replOpts :: GhcOptions
</span><a href="#local-6989586621679718211"><span class="hs-identifier hs-var hs-var">replOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-729"></span><span>        </span><span class="annot"><span class="annottext">ghcOptMode :: Flag GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptMode"><span class="hs-identifier hs-var">ghcOptMode</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcMode -&gt; Flag GhcMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcModeInteractive"><span class="hs-identifier hs-var">GhcModeInteractive</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-730"></span><span>        </span><span class="annot"><span class="annottext">ghcOptPackageDBs :: [PackageDB]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptPackageDBs"><span class="hs-identifier hs-var">ghcOptPackageDBs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718213"><span class="hs-identifier hs-var">packageDBs</span></a></span><span>
</span><span id="line-731"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-732"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; [PackageDB] -&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#checkPackageDbStack"><span class="hs-identifier hs-var">checkPackageDbStack</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718217"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679718213"><span class="hs-identifier hs-var">packageDBs</span></a></span><span>
</span><span id="line-733"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679718209"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718209"><span class="hs-identifier hs-var">ghcjsProg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program -&gt; ProgramDb -&gt; IO (ConfiguredProgram, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgram"><span class="hs-identifier hs-var">requireProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718217"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679718216"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-734"></span><span>  </span><span class="annot"><span class="annottext">Verbosity
-&gt; ConfiguredProgram -&gt; Compiler -&gt; Platform -&gt; GhcOptions -&gt; IO ()
</span><a href="Distribution.Simple.Program.GHC.html#runGHC"><span class="hs-identifier hs-var">runGHC</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718217"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718209"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718215"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718214"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679718211"><span class="hs-identifier hs-var">replOpts</span></a></span><span>
</span><span id="line-735"></span><span>
</span><span id="line-736"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-737"></span><span class="hs-comment">-- Building an executable or foreign library</span><span>
</span><span id="line-738"></span><span>
</span><span id="line-739"></span><span class="hs-comment">-- | Build a foreign library</span><span>
</span><span id="line-740"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#buildFLib"><span class="hs-identifier hs-type">buildFLib</span></a></span><span>
</span><span id="line-741"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-742"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-743"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-744"></span><span id="buildFLib"><span class="annot"><span class="annottext">buildFLib :: Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; ForeignLib
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#buildFLib"><span class="hs-identifier hs-var hs-var">buildFLib</span></a></span></span><span> </span><span id="local-6989586621679718208"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718208"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679718207"><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718207"><span class="hs-identifier hs-var">njobs</span></a></span></span><span> </span><span id="local-6989586621679718206"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718206"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679718205"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718205"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; GBuildMode
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#gbuild"><span class="hs-identifier hs-var">gbuild</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718208"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718207"><span class="hs-identifier hs-var">njobs</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718206"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718205"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">(GBuildMode -&gt; ComponentLocalBuildInfo -&gt; IO ())
-&gt; (ForeignLib -&gt; GBuildMode)
-&gt; ForeignLib
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; GBuildMode
</span><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-var">GBuildFLib</span></a></span><span>
</span><span id="line-745"></span><span>
</span><span id="line-746"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#replFLib"><span class="hs-identifier hs-type">replFLib</span></a></span><span>
</span><span id="line-747"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-748"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-749"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span>
</span><span id="line-750"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-751"></span><span id="replFLib"><span class="annot"><span class="annottext">replFLib :: [String]
-&gt; Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; ForeignLib
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#replFLib"><span class="hs-identifier hs-var hs-var">replFLib</span></a></span></span><span> </span><span id="local-6989586621679718202"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718202"><span class="hs-identifier hs-var">replFlags</span></a></span></span><span>  </span><span id="local-6989586621679718201"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718201"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679718200"><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718200"><span class="hs-identifier hs-var">njobs</span></a></span></span><span> </span><span id="local-6989586621679718199"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718199"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679718198"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718198"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-752"></span><span>  </span><span class="annot"><span class="annottext">Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; GBuildMode
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#gbuild"><span class="hs-identifier hs-var">gbuild</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718201"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718200"><span class="hs-identifier hs-var">njobs</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718199"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718198"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">(GBuildMode -&gt; ComponentLocalBuildInfo -&gt; IO ())
-&gt; (ForeignLib -&gt; GBuildMode)
-&gt; ForeignLib
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; ForeignLib -&gt; GBuildMode
</span><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-var">GReplFLib</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718202"><span class="hs-identifier hs-var">replFlags</span></a></span><span>
</span><span id="line-753"></span><span>
</span><span id="line-754"></span><span class="hs-comment">-- | Build an executable with GHC.</span><span>
</span><span id="line-755"></span><span class="hs-comment">--</span><span>
</span><span id="line-756"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#buildExe"><span class="hs-identifier hs-type">buildExe</span></a></span><span>
</span><span id="line-757"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-758"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-759"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-760"></span><span id="buildExe"><span class="annot"><span class="annottext">buildExe :: Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Executable
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#buildExe"><span class="hs-identifier hs-var hs-var">buildExe</span></a></span></span><span> </span><span id="local-6989586621679718196"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718196"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679718195"><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718195"><span class="hs-identifier hs-var">njobs</span></a></span></span><span> </span><span id="local-6989586621679718194"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718194"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679718193"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718193"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; GBuildMode
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#gbuild"><span class="hs-identifier hs-var">gbuild</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718196"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718195"><span class="hs-identifier hs-var">njobs</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718194"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718193"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">(GBuildMode -&gt; ComponentLocalBuildInfo -&gt; IO ())
-&gt; (Executable -&gt; GBuildMode)
-&gt; Executable
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Executable -&gt; GBuildMode
</span><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-var">GBuildExe</span></a></span><span>
</span><span id="line-761"></span><span>
</span><span id="line-762"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#replExe"><span class="hs-identifier hs-type">replExe</span></a></span><span>
</span><span id="line-763"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-764"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-765"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span>
</span><span id="line-766"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-767"></span><span id="replExe"><span class="annot"><span class="annottext">replExe :: [String]
-&gt; Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Executable
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#replExe"><span class="hs-identifier hs-var hs-var">replExe</span></a></span></span><span> </span><span id="local-6989586621679718191"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718191"><span class="hs-identifier hs-var">replFlags</span></a></span></span><span> </span><span id="local-6989586621679718190"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718190"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679718189"><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718189"><span class="hs-identifier hs-var">njobs</span></a></span></span><span> </span><span id="local-6989586621679718188"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718188"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679718187"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718187"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-768"></span><span>  </span><span class="annot"><span class="annottext">Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; GBuildMode
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#gbuild"><span class="hs-identifier hs-var">gbuild</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718190"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718189"><span class="hs-identifier hs-var">njobs</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718188"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718187"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">(GBuildMode -&gt; ComponentLocalBuildInfo -&gt; IO ())
-&gt; (Executable -&gt; GBuildMode)
-&gt; Executable
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Executable -&gt; GBuildMode
</span><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-var">GReplExe</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718191"><span class="hs-identifier hs-var">replFlags</span></a></span><span>
</span><span id="line-769"></span><span>
</span><span id="line-770"></span><span class="hs-comment">-- | Building an executable, starting the REPL, and building foreign</span><span>
</span><span id="line-771"></span><span class="hs-comment">-- libraries are all very similar and implemented in 'gbuild'. The</span><span>
</span><span id="line-772"></span><span class="hs-comment">-- 'GBuildMode' distinguishes between the various kinds of operation.</span><span>
</span><span id="line-773"></span><span class="hs-keyword">data</span><span> </span><span id="GBuildMode"><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildMode"><span class="hs-identifier hs-var">GBuildMode</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-774"></span><span>    </span><span id="GBuildExe"><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-var">GBuildExe</span></a></span></span><span>  </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span>
</span><span id="line-775"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="GReplExe"><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-var">GReplExe</span></a></span></span><span>   </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span>
</span><span id="line-776"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="GBuildFLib"><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-var">GBuildFLib</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span>
</span><span id="line-777"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="GReplFLib"><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-var">GReplFLib</span></a></span></span><span>  </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span>
</span><span id="line-778"></span><span>
</span><span id="line-779"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildInfo"><span class="hs-identifier hs-type">gbuildInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildMode"><span class="hs-identifier hs-type">GBuildMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span>
</span><span id="line-780"></span><span id="gbuildInfo"><span class="annot"><span class="annottext">gbuildInfo :: GBuildMode -&gt; BuildInfo
</span><a href="Distribution.Simple.GHCJS.html#gbuildInfo"><span class="hs-identifier hs-var hs-var">gbuildInfo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-type">GBuildExe</span></a></span><span>  </span><span id="local-6989586621679718184"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718184"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; BuildInfo
</span><a href="Distribution.Types.Executable.html#buildInfo"><span class="hs-identifier hs-var hs-var">buildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718184"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-781"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildInfo"><span class="hs-identifier hs-var">gbuildInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-type">GReplExe</span></a></span><span>   </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718182"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718182"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; BuildInfo
</span><a href="Distribution.Types.Executable.html#buildInfo"><span class="hs-identifier hs-var hs-var">buildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718182"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-782"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildInfo"><span class="hs-identifier hs-var">gbuildInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span> </span><span id="local-6989586621679718181"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718181"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; BuildInfo
</span><a href="Distribution.Types.ForeignLib.html#foreignLibBuildInfo"><span class="hs-identifier hs-var hs-var">foreignLibBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718181"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-783"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildInfo"><span class="hs-identifier hs-var">gbuildInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-type">GReplFLib</span></a></span><span>  </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718179"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718179"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; BuildInfo
</span><a href="Distribution.Types.ForeignLib.html#foreignLibBuildInfo"><span class="hs-identifier hs-var hs-var">foreignLibBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718179"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-784"></span><span>
</span><span id="line-785"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildName"><span class="hs-identifier hs-type">gbuildName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildMode"><span class="hs-identifier hs-type">GBuildMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-786"></span><span id="gbuildName"><span class="annot"><span class="annottext">gbuildName :: GBuildMode -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#gbuildName"><span class="hs-identifier hs-var hs-var">gbuildName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-type">GBuildExe</span></a></span><span>  </span><span id="local-6989586621679718177"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718177"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Executable -&gt; UnqualComponentName
</span><a href="Distribution.Types.Executable.html#exeName"><span class="hs-identifier hs-var hs-var">exeName</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718177"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-787"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildName"><span class="hs-identifier hs-var">gbuildName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-type">GReplExe</span></a></span><span>   </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718174"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718174"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Executable -&gt; UnqualComponentName
</span><a href="Distribution.Types.Executable.html#exeName"><span class="hs-identifier hs-var hs-var">exeName</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718174"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-788"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildName"><span class="hs-identifier hs-var">gbuildName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span> </span><span id="local-6989586621679718173"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718173"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; UnqualComponentName
</span><a href="Distribution.Types.ForeignLib.html#foreignLibName"><span class="hs-identifier hs-var hs-var">foreignLibName</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718173"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-789"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildName"><span class="hs-identifier hs-var">gbuildName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-type">GReplFLib</span></a></span><span>  </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718171"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718171"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; UnqualComponentName
</span><a href="Distribution.Types.ForeignLib.html#foreignLibName"><span class="hs-identifier hs-var hs-var">foreignLibName</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718171"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-790"></span><span>
</span><span id="line-791"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildTargetName"><span class="hs-identifier hs-type">gbuildTargetName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildMode"><span class="hs-identifier hs-type">GBuildMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-792"></span><span id="gbuildTargetName"><span class="annot"><span class="annottext">gbuildTargetName :: LocalBuildInfo -&gt; GBuildMode -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#gbuildTargetName"><span class="hs-identifier hs-var hs-var">gbuildTargetName</span></a></span></span><span> </span><span id="local-6989586621679718169"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718169"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-type">GBuildExe</span></a></span><span>  </span><span id="local-6989586621679718168"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718168"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Executable -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#exeTargetName"><span class="hs-identifier hs-var">exeTargetName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718169"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718168"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-793"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildTargetName"><span class="hs-identifier hs-var">gbuildTargetName</span></a></span><span> </span><span id="local-6989586621679718166"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718166"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-type">GReplExe</span></a></span><span>   </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718165"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718165"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Executable -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#exeTargetName"><span class="hs-identifier hs-var">exeTargetName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718166"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718165"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-794"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildTargetName"><span class="hs-identifier hs-var">gbuildTargetName</span></a></span><span> </span><span id="local-6989586621679718164"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718164"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span> </span><span id="local-6989586621679718163"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718163"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ForeignLib -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#flibTargetName"><span class="hs-identifier hs-var">flibTargetName</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718164"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718163"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-795"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildTargetName"><span class="hs-identifier hs-var">gbuildTargetName</span></a></span><span> </span><span id="local-6989586621679718161"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718161"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-type">GReplFLib</span></a></span><span>  </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718160"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718160"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ForeignLib -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#flibTargetName"><span class="hs-identifier hs-var">flibTargetName</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718161"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718160"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-796"></span><span>
</span><span id="line-797"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#exeTargetName"><span class="hs-identifier hs-type">exeTargetName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-798"></span><span id="exeTargetName"><span class="annot"><span class="annottext">exeTargetName :: Platform -&gt; Executable -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#exeTargetName"><span class="hs-identifier hs-var hs-var">exeTargetName</span></a></span></span><span> </span><span id="local-6989586621679718159"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718159"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621679718158"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718158"><span class="hs-identifier hs-var">exe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Executable -&gt; UnqualComponentName
</span><a href="Distribution.Types.Executable.html#exeName"><span class="hs-identifier hs-var hs-var">exeName</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718158"><span class="hs-identifier hs-var">exe</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#withExt"><span class="hs-operator hs-var">`withExt`</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#exeExtension"><span class="hs-identifier hs-var">exeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718159"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-799"></span><span>
</span><span id="line-800"></span><span class="hs-comment">-- | Target name for a foreign library (the actual file name)</span><span>
</span><span id="line-801"></span><span class="hs-comment">--</span><span>
</span><span id="line-802"></span><span class="hs-comment">-- We do not use mkLibName and co here because the naming for foreign libraries</span><span>
</span><span id="line-803"></span><span class="hs-comment">-- is slightly different (we don't use &quot;_p&quot; or compiler version suffices, and we</span><span>
</span><span id="line-804"></span><span class="hs-comment">-- don't want the &quot;lib&quot; prefix on Windows).</span><span>
</span><span id="line-805"></span><span class="hs-comment">--</span><span>
</span><span id="line-806"></span><span class="hs-comment">-- TODO: We do use `dllExtension` and co here, but really that's wrong: they</span><span>
</span><span id="line-807"></span><span class="hs-comment">-- use the OS used to build cabal to determine which extension to use, rather</span><span>
</span><span id="line-808"></span><span class="hs-comment">-- than the target OS (but this is wrong elsewhere in Cabal as well).</span><span>
</span><span id="line-809"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#flibTargetName"><span class="hs-identifier hs-type">flibTargetName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-810"></span><span id="flibTargetName"><span class="annot"><span class="annottext">flibTargetName :: LocalBuildInfo -&gt; ForeignLib -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#flibTargetName"><span class="hs-identifier hs-var hs-var">flibTargetName</span></a></span></span><span> </span><span id="local-6989586621679718156"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718156"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679718155"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718155"><span class="hs-identifier hs-var">flib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-811"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718154"><span class="hs-identifier hs-var">os</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; ForeignLibType
</span><a href="Distribution.Types.ForeignLib.html#foreignLibType"><span class="hs-identifier hs-var hs-var">foreignLibType</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718155"><span class="hs-identifier hs-var">flib</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-812"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeShared"><span class="hs-identifier hs-var">ForeignLibNativeShared</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718150"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dll&quot;</span></span><span>
</span><span id="line-813"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeStatic"><span class="hs-identifier hs-var">ForeignLibNativeStatic</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718150"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lib&quot;</span></span><span>
</span><span id="line-814"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Linux"><span class="hs-identifier hs-var">Linux</span></a></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeShared"><span class="hs-identifier hs-var">ForeignLibNativeShared</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lib&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718150"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718147"><span class="hs-identifier hs-var">versionedExt</span></a></span><span>
</span><span id="line-815"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679718146"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718146"><span class="hs-identifier hs-var">_other</span></a></span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeShared"><span class="hs-identifier hs-var">ForeignLibNativeShared</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lib&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718150"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#dllExtension"><span class="hs-identifier hs-var">dllExtension</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718156"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-816"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679718144"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718144"><span class="hs-identifier hs-var">_other</span></a></span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeStatic"><span class="hs-identifier hs-var">ForeignLibNativeStatic</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lib&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718150"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#staticLibExtension"><span class="hs-identifier hs-var">staticLibExtension</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718156"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-817"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679718142"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718142"><span class="hs-identifier hs-var">_any</span></a></span></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibTypeUnknown"><span class="hs-identifier hs-var">ForeignLibTypeUnknown</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. String -&gt; a
</span><a href="Distribution.PackageDescription.Utils.html#cabalBug"><span class="hs-identifier hs-var">cabalBug</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unknown foreign lib type&quot;</span></span><span>
</span><span id="line-818"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-819"></span><span>    </span><span class="annot"><a href="#local-6989586621679718150"><span class="hs-identifier hs-type">nm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-820"></span><span>    </span><span id="local-6989586621679718150"><span class="annot"><span class="annottext">nm :: String
</span><a href="#local-6989586621679718150"><span class="hs-identifier hs-var hs-var">nm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; UnqualComponentName
</span><a href="Distribution.Types.ForeignLib.html#foreignLibName"><span class="hs-identifier hs-var hs-var">foreignLibName</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718155"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-821"></span><span>
</span><span id="line-822"></span><span>    </span><span class="annot"><a href="#local-6989586621679718154"><span class="hs-identifier hs-type">os</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.System.html#OS"><span class="hs-identifier hs-type">OS</span></a></span><span>
</span><span id="line-823"></span><span>    </span><span id="local-6989586621679718154"><span class="annot"><span class="annottext">os :: OS
</span><a href="#local-6989586621679718154"><span class="hs-identifier hs-var hs-var">os</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718140"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718140"><span class="hs-identifier hs-var">os'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718156"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-824"></span><span>         </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718140"><span class="hs-identifier hs-var">os'</span></a></span><span>
</span><span id="line-825"></span><span>
</span><span id="line-826"></span><span>    </span><span class="hs-comment">-- If a foreign lib foo has lib-version-info 5:1:2 or</span><span>
</span><span id="line-827"></span><span>    </span><span class="hs-comment">-- lib-version-linux 3.2.1, it should be built as libfoo.so.3.2.1</span><span>
</span><span id="line-828"></span><span>    </span><span class="hs-comment">-- Libtool's version-info data is translated into library versions in a</span><span>
</span><span id="line-829"></span><span>    </span><span class="hs-comment">-- nontrivial way: so refer to libtool documentation.</span><span>
</span><span id="line-830"></span><span>    </span><span class="annot"><a href="#local-6989586621679718147"><span class="hs-identifier hs-type">versionedExt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-831"></span><span>    </span><span id="local-6989586621679718147"><span class="annot"><span class="annottext">versionedExt :: String
</span><a href="#local-6989586621679718147"><span class="hs-identifier hs-var hs-var">versionedExt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-832"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718139"><span class="annot"><span class="annottext">nums :: [Int]
</span><a href="#local-6989586621679718139"><span class="hs-identifier hs-var hs-var">nums</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; OS -&gt; [Int]
</span><a href="Distribution.Types.ForeignLib.html#foreignLibVersion"><span class="hs-identifier hs-var">foreignLibVersion</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718155"><span class="hs-identifier hs-var">flib</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718154"><span class="hs-identifier hs-var">os</span></a></span><span>
</span><span id="line-833"></span><span>      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; String) -&gt; String -&gt; [String] -&gt; String
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl"><span class="hs-identifier hs-var">foldl</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">(&lt;.&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;so&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; String) -&gt; [Int] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679718139"><span class="hs-identifier hs-var">nums</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-834"></span><span>
</span><span id="line-835"></span><span class="hs-comment">-- | Name for the library when building.</span><span>
</span><span id="line-836"></span><span class="hs-comment">--</span><span>
</span><span id="line-837"></span><span class="hs-comment">-- If the `lib-version-info` field or the `lib-version-linux` field of</span><span>
</span><span id="line-838"></span><span class="hs-comment">-- a foreign library target is set, we need to incorporate that</span><span>
</span><span id="line-839"></span><span class="hs-comment">-- version into the SONAME field.</span><span>
</span><span id="line-840"></span><span class="hs-comment">--</span><span>
</span><span id="line-841"></span><span class="hs-comment">-- If a foreign library foo has lib-version-info 5:1:2, it should be</span><span>
</span><span id="line-842"></span><span class="hs-comment">-- built as libfoo.so.3.2.1.  We want it to get soname libfoo.so.3.</span><span>
</span><span id="line-843"></span><span class="hs-comment">-- However, GHC does not allow overriding soname by setting linker</span><span>
</span><span id="line-844"></span><span class="hs-comment">-- options, as it sets a soname of its own (namely the output</span><span>
</span><span id="line-845"></span><span class="hs-comment">-- filename), after the user-supplied linker options.  Hence, we have</span><span>
</span><span id="line-846"></span><span class="hs-comment">-- to compile the library with the soname as its filename.  We rename</span><span>
</span><span id="line-847"></span><span class="hs-comment">-- the compiled binary afterwards.</span><span>
</span><span id="line-848"></span><span class="hs-comment">--</span><span>
</span><span id="line-849"></span><span class="hs-comment">-- This method allows to adjust the name of the library at build time</span><span>
</span><span id="line-850"></span><span class="hs-comment">-- such that the correct soname can be set.</span><span>
</span><span id="line-851"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#flibBuildName"><span class="hs-identifier hs-type">flibBuildName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-852"></span><span id="flibBuildName"><span class="annot"><span class="annottext">flibBuildName :: LocalBuildInfo -&gt; ForeignLib -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#flibBuildName"><span class="hs-identifier hs-var hs-var">flibBuildName</span></a></span></span><span> </span><span id="local-6989586621679718135"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718135"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679718134"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718134"><span class="hs-identifier hs-var">flib</span></a></span></span><span>
</span><span id="line-853"></span><span>  </span><span class="hs-comment">-- On linux, if a foreign-library has version data, the first digit is used</span><span>
</span><span id="line-854"></span><span>  </span><span class="hs-comment">-- to produce the SONAME.</span><span>
</span><span id="line-855"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718133"><span class="hs-identifier hs-var">os</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; ForeignLibType
</span><a href="Distribution.Types.ForeignLib.html#foreignLibType"><span class="hs-identifier hs-var hs-var">foreignLibType</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718134"><span class="hs-identifier hs-var">flib</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(OS, ForeignLibType) -&gt; (OS, ForeignLibType) -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span>
</span><span id="line-856"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Linux"><span class="hs-identifier hs-var">Linux</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeShared"><span class="hs-identifier hs-var">ForeignLibNativeShared</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-857"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718132"><span class="annot"><span class="annottext">nums :: [Int]
</span><a href="#local-6989586621679718132"><span class="hs-identifier hs-var hs-var">nums</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; OS -&gt; [Int]
</span><a href="Distribution.Types.ForeignLib.html#foreignLibVersion"><span class="hs-identifier hs-var">foreignLibVersion</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718134"><span class="hs-identifier hs-var">flib</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718133"><span class="hs-identifier hs-var">os</span></a></span><span>
</span><span id="line-858"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lib&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718131"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String -&gt; String) -&gt; String -&gt; [String] -&gt; String
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl"><span class="hs-identifier hs-var">foldl</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">(&lt;.&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;so&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; String) -&gt; [Int] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; [Int] -&gt; [Int]
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#take"><span class="hs-identifier hs-var">take</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621679718132"><span class="hs-identifier hs-var">nums</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-859"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ForeignLib -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#flibTargetName"><span class="hs-identifier hs-var">flibTargetName</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718135"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718134"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-860"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-861"></span><span>    </span><span class="annot"><a href="#local-6989586621679718133"><span class="hs-identifier hs-type">os</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.System.html#OS"><span class="hs-identifier hs-type">OS</span></a></span><span>
</span><span id="line-862"></span><span>    </span><span id="local-6989586621679718133"><span class="annot"><span class="annottext">os :: OS
</span><a href="#local-6989586621679718133"><span class="hs-identifier hs-var hs-var">os</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718129"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718129"><span class="hs-identifier hs-var">os'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718135"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-863"></span><span>         </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679718129"><span class="hs-identifier hs-var">os'</span></a></span><span>
</span><span id="line-864"></span><span>
</span><span id="line-865"></span><span>    </span><span class="annot"><a href="#local-6989586621679718131"><span class="hs-identifier hs-type">nm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-866"></span><span>    </span><span id="local-6989586621679718131"><span class="annot"><span class="annottext">nm :: String
</span><a href="#local-6989586621679718131"><span class="hs-identifier hs-var hs-var">nm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; UnqualComponentName
</span><a href="Distribution.Types.ForeignLib.html#foreignLibName"><span class="hs-identifier hs-var hs-var">foreignLibName</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718134"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-867"></span><span>
</span><span id="line-868"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildIsRepl"><span class="hs-identifier hs-type">gbuildIsRepl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildMode"><span class="hs-identifier hs-type">GBuildMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-869"></span><span id="gbuildIsRepl"><span class="annot"><span class="annottext">gbuildIsRepl :: GBuildMode -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#gbuildIsRepl"><span class="hs-identifier hs-var hs-var">gbuildIsRepl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-type">GBuildExe</span></a></span><span>  </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-870"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildIsRepl"><span class="hs-identifier hs-var">gbuildIsRepl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-type">GReplExe</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-871"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildIsRepl"><span class="hs-identifier hs-var">gbuildIsRepl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-872"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildIsRepl"><span class="hs-identifier hs-var">gbuildIsRepl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-type">GReplFLib</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-873"></span><span>
</span><span id="line-874"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildNeedDynamic"><span class="hs-identifier hs-type">gbuildNeedDynamic</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildMode"><span class="hs-identifier hs-type">GBuildMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-875"></span><span id="gbuildNeedDynamic"><span class="annot"><span class="annottext">gbuildNeedDynamic :: LocalBuildInfo -&gt; GBuildMode -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#gbuildNeedDynamic"><span class="hs-identifier hs-var hs-var">gbuildNeedDynamic</span></a></span></span><span> </span><span id="local-6989586621679718126"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718126"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679718125"><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718125"><span class="hs-identifier hs-var">bm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-876"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718125"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-877"></span><span>      </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-type">GBuildExe</span></a></span><span>  </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withDynExe"><span class="hs-identifier hs-var hs-var">withDynExe</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718126"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-878"></span><span>      </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-type">GReplExe</span></a></span><span>   </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withDynExe"><span class="hs-identifier hs-var hs-var">withDynExe</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718126"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-879"></span><span>      </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span> </span><span id="local-6989586621679718123"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718123"><span class="hs-identifier hs-var">flib</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; Bool
</span><a href="#local-6989586621679718122"><span class="hs-identifier hs-var">withDynFLib</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718123"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-880"></span><span>      </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-type">GReplFLib</span></a></span><span>  </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718121"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718121"><span class="hs-identifier hs-var">flib</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; Bool
</span><a href="#local-6989586621679718122"><span class="hs-identifier hs-var">withDynFLib</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718121"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-881"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-882"></span><span>    </span><span id="local-6989586621679718122"><span class="annot"><span class="annottext">withDynFLib :: ForeignLib -&gt; Bool
</span><a href="#local-6989586621679718122"><span class="hs-identifier hs-var hs-var">withDynFLib</span></a></span></span><span> </span><span id="local-6989586621679718117"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718117"><span class="hs-identifier hs-var">flib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-883"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; ForeignLibType
</span><a href="Distribution.Types.ForeignLib.html#foreignLibType"><span class="hs-identifier hs-var hs-var">foreignLibType</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718117"><span class="hs-identifier hs-var">flib</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-884"></span><span>        </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeShared"><span class="hs-identifier hs-var">ForeignLibNativeShared</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-885"></span><span>          </span><span class="annot"><span class="annottext">ForeignLibOption
</span><a href="Distribution.Types.ForeignLibOption.html#ForeignLibStandalone"><span class="hs-identifier hs-var">ForeignLibStandalone</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLibOption -&gt; [ForeignLibOption] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#notElem"><span class="hs-operator hs-var">`notElem`</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; [ForeignLibOption]
</span><a href="Distribution.Types.ForeignLib.html#foreignLibOptions"><span class="hs-identifier hs-var hs-var">foreignLibOptions</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718117"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-886"></span><span>        </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeStatic"><span class="hs-identifier hs-var">ForeignLibNativeStatic</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-887"></span><span>          </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-888"></span><span>        </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibTypeUnknown"><span class="hs-identifier hs-var">ForeignLibTypeUnknown</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-889"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. String -&gt; a
</span><a href="Distribution.PackageDescription.Utils.html#cabalBug"><span class="hs-identifier hs-var">cabalBug</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unknown foreign lib type&quot;</span></span><span>
</span><span id="line-890"></span><span>
</span><span id="line-891"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildModDefFiles"><span class="hs-identifier hs-type">gbuildModDefFiles</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildMode"><span class="hs-identifier hs-type">GBuildMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-892"></span><span id="gbuildModDefFiles"><span class="annot"><span class="annottext">gbuildModDefFiles :: GBuildMode -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#gbuildModDefFiles"><span class="hs-identifier hs-var hs-var">gbuildModDefFiles</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-type">GBuildExe</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-893"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildModDefFiles"><span class="hs-identifier hs-var">gbuildModDefFiles</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-type">GReplExe</span></a></span><span>  </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-894"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildModDefFiles"><span class="hs-identifier hs-var">gbuildModDefFiles</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span> </span><span id="local-6989586621679718113"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718113"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; [String]
</span><a href="Distribution.Types.ForeignLib.html#foreignLibModDefFile"><span class="hs-identifier hs-var hs-var">foreignLibModDefFile</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718113"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-895"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildModDefFiles"><span class="hs-identifier hs-var">gbuildModDefFiles</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-type">GReplFLib</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718111"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718111"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; [String]
</span><a href="Distribution.Types.ForeignLib.html#foreignLibModDefFile"><span class="hs-identifier hs-var hs-var">foreignLibModDefFile</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718111"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-896"></span><span>
</span><span id="line-897"></span><span class="hs-comment">-- | &quot;Main&quot; module name when overridden by @ghc-options: -main-is ...@</span><span>
</span><span id="line-898"></span><span class="hs-comment">-- or 'Nothing' if no @-main-is@ flag could be found.</span><span>
</span><span id="line-899"></span><span class="hs-comment">--</span><span>
</span><span id="line-900"></span><span class="hs-comment">-- In case of 'Nothing', 'Distribution.ModuleName.main' can be assumed.</span><span>
</span><span id="line-901"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#exeMainModuleName"><span class="hs-identifier hs-type">exeMainModuleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-902"></span><span id="exeMainModuleName"><span class="annot"><span class="annottext">exeMainModuleName :: Executable -&gt; Maybe ModuleName
</span><a href="Distribution.Simple.GHCJS.html#exeMainModuleName"><span class="hs-identifier hs-var hs-var">exeMainModuleName</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">buildInfo :: Executable -&gt; BuildInfo
</span><a href="Distribution.Types.Executable.html#buildInfo"><span class="hs-identifier hs-var">buildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718108"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718108"><span class="hs-identifier hs-var">bnfo</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-903"></span><span>    </span><span class="hs-comment">-- GHC honors the last occurrence of a module name updated via -main-is</span><span>
</span><span id="line-904"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-905"></span><span>    </span><span class="hs-comment">-- Moreover, -main-is when parsed left-to-right can update either</span><span>
</span><span id="line-906"></span><span>    </span><span class="hs-comment">-- the &quot;Main&quot; module name, or the &quot;main&quot; function name, or both,</span><span>
</span><span id="line-907"></span><span>    </span><span class="hs-comment">-- see also 'decodeMainIsArg'.</span><span>
</span><span id="line-908"></span><span>    </span><span class="annot"><span class="annottext">[Maybe ModuleName] -&gt; Maybe ModuleName
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Foldable t, MonadPlus m) =&gt;
t (m a) -&gt; m a
</span><a href="../../base/src/Data.Foldable.html#msum"><span class="hs-identifier hs-var">msum</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe ModuleName] -&gt; Maybe ModuleName)
-&gt; [Maybe ModuleName] -&gt; Maybe ModuleName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe ModuleName] -&gt; [Maybe ModuleName]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe ModuleName] -&gt; [Maybe ModuleName])
-&gt; [Maybe ModuleName] -&gt; [Maybe ModuleName]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Maybe ModuleName) -&gt; [String] -&gt; [Maybe ModuleName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe ModuleName
</span><a href="Distribution.Simple.GHCJS.html#decodeMainIsArg"><span class="hs-identifier hs-var">decodeMainIsArg</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [Maybe ModuleName]) -&gt; [String] -&gt; [Maybe ModuleName]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="#local-6989586621679718105"><span class="hs-identifier hs-var">findIsMainArgs</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718104"><span class="hs-identifier hs-var">ghcopts</span></a></span><span>
</span><span id="line-909"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-910"></span><span>    </span><span id="local-6989586621679718104"><span class="annot"><span class="annottext">ghcopts :: [String]
</span><a href="#local-6989586621679718104"><span class="hs-identifier hs-var hs-var">ghcopts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcOptions"><span class="hs-identifier hs-var">hcOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718108"><span class="hs-identifier hs-var">bnfo</span></a></span><span>
</span><span id="line-911"></span><span>
</span><span id="line-912"></span><span>    </span><span id="local-6989586621679718105"><span class="annot"><span class="annottext">findIsMainArgs :: [String] -&gt; [String]
</span><a href="#local-6989586621679718105"><span class="hs-identifier hs-var hs-var">findIsMainArgs</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-913"></span><span>    </span><span class="annot"><a href="#local-6989586621679718105"><span class="hs-identifier hs-var">findIsMainArgs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-main-is&quot;</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679718102"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718102"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679718101"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718101"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718102"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="#local-6989586621679718105"><span class="hs-identifier hs-var">findIsMainArgs</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718101"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-914"></span><span>    </span><span class="annot"><a href="#local-6989586621679718105"><span class="hs-identifier hs-var">findIsMainArgs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679718100"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718100"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="#local-6989586621679718105"><span class="hs-identifier hs-var">findIsMainArgs</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718100"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-915"></span><span>
</span><span id="line-916"></span><span class="hs-comment">-- | Decode argument to '-main-is'</span><span>
</span><span id="line-917"></span><span class="hs-comment">--</span><span>
</span><span id="line-918"></span><span class="hs-comment">-- Returns 'Nothing' if argument set only the function name.</span><span>
</span><span id="line-919"></span><span class="hs-comment">--</span><span>
</span><span id="line-920"></span><span class="hs-comment">-- This code has been stolen/refactored from GHC's DynFlags.setMainIs</span><span>
</span><span id="line-921"></span><span class="hs-comment">-- function. The logic here is deliberately imperfect as it is</span><span>
</span><span id="line-922"></span><span class="hs-comment">-- intended to be bug-compatible with GHC's parser. See discussion in</span><span>
</span><span id="line-923"></span><span class="hs-comment">-- https://github.com/haskell/cabal/pull/4539#discussion_r118981753.</span><span>
</span><span id="line-924"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#decodeMainIsArg"><span class="hs-identifier hs-type">decodeMainIsArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-925"></span><span id="decodeMainIsArg"><span class="annot"><span class="annottext">decodeMainIsArg :: String -&gt; Maybe ModuleName
</span><a href="Distribution.Simple.GHCJS.html#decodeMainIsArg"><span class="hs-identifier hs-var hs-var">decodeMainIsArg</span></a></span></span><span> </span><span id="local-6989586621679718099"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718099"><span class="hs-identifier hs-var">arg</span></a></span></span><span>
</span><span id="line-926"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Char -&gt; Bool) -&gt; Bool
</span><a href="#local-6989586621679718098"><span class="hs-identifier hs-var">headOf</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718097"><span class="hs-identifier hs-var">main_fn</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isLower"><span class="hs-identifier hs-var">isLower</span></a></span><span>
</span><span id="line-927"></span><span>                        </span><span class="hs-comment">-- The arg looked like &quot;Foo.Bar.baz&quot;</span><span>
</span><span id="line-928"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; Maybe ModuleName
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ModuleName
forall a. IsString a =&gt; String -&gt; a
</span><a href="../../base/src/Data.String.html#fromString"><span class="hs-identifier hs-var">ModuleName.fromString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718096"><span class="hs-identifier hs-var">main_mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-929"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Char -&gt; Bool) -&gt; Bool
</span><a href="#local-6989586621679718098"><span class="hs-identifier hs-var">headOf</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718099"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isUpper"><span class="hs-identifier hs-var">isUpper</span></a></span><span>  </span><span class="hs-comment">-- The arg looked like &quot;Foo&quot; or &quot;Foo.Bar&quot;</span><span>
</span><span id="line-930"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; Maybe ModuleName
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ModuleName
forall a. IsString a =&gt; String -&gt; a
</span><a href="../../base/src/Data.String.html#fromString"><span class="hs-identifier hs-var">ModuleName.fromString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718099"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-931"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-comment">-- The arg looked like &quot;baz&quot;</span><span>
</span><span id="line-932"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe ModuleName
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-933"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-934"></span><span>    </span><span class="annot"><a href="#local-6989586621679718098"><span class="hs-identifier hs-type">headOf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-935"></span><span>    </span><span id="local-6989586621679718098"><span class="annot"><span class="annottext">headOf :: String -&gt; (Char -&gt; Bool) -&gt; Bool
</span><a href="#local-6989586621679718098"><span class="hs-identifier hs-var hs-var">headOf</span></a></span></span><span> </span><span id="local-6989586621679718094"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718094"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span id="local-6989586621679718093"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679718093"><span class="hs-identifier hs-var">pred'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; Maybe Char -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679718093"><span class="hs-identifier hs-var">pred'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Maybe Char
forall a. [a] -&gt; Maybe a
</span><a href="Distribution.Utils.Generic.html#safeHead"><span class="hs-identifier hs-var">safeHead</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718094"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-936"></span><span>
</span><span id="line-937"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679718096"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718096"><span class="hs-identifier hs-var">main_mod</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718097"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718097"><span class="hs-identifier hs-var">main_fn</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Char -&gt; Bool) -&gt; (String, String)
</span><a href="#local-6989586621679718089"><span class="hs-identifier hs-var">splitLongestPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718099"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="hs-special">)</span><span>
</span><span id="line-938"></span><span>
</span><span id="line-939"></span><span>    </span><span class="annot"><a href="#local-6989586621679718089"><span class="hs-identifier hs-type">splitLongestPrefix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-940"></span><span>    </span><span id="local-6989586621679718089"><span class="annot"><span class="annottext">splitLongestPrefix :: String -&gt; (Char -&gt; Bool) -&gt; (String, String)
</span><a href="#local-6989586621679718089"><span class="hs-identifier hs-var hs-var">splitLongestPrefix</span></a></span></span><span> </span><span id="local-6989586621679718088"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718088"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span id="local-6989586621679718087"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679718087"><span class="hs-identifier hs-var">pred'</span></a></span></span><span>
</span><span id="line-941"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718086"><span class="hs-identifier hs-var">r_pre</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718088"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">,</span><span>           </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-942"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. [a] -&gt; [a]
</span><a href="Distribution.Utils.Generic.html#safeTail"><span class="hs-identifier hs-var">safeTail</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718086"><span class="hs-identifier hs-var">r_pre</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718084"><span class="hs-identifier hs-var">r_suf</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-943"></span><span>                           </span><span class="hs-comment">-- 'safeTail' drops the char satisfying 'pred'</span><span>
</span><span id="line-944"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679718084"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718084"><span class="hs-identifier hs-var">r_suf</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718086"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718086"><span class="hs-identifier hs-var">r_pre</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679718087"><span class="hs-identifier hs-var">pred'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718088"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-945"></span><span>
</span><span id="line-946"></span><span>
</span><span id="line-947"></span><span class="hs-comment">-- | A collection of:</span><span>
</span><span id="line-948"></span><span class="hs-comment">--    * C input files</span><span>
</span><span id="line-949"></span><span class="hs-comment">--    * C++ input files</span><span>
</span><span id="line-950"></span><span class="hs-comment">--    * GHC input files</span><span>
</span><span id="line-951"></span><span class="hs-comment">--    * GHC input modules</span><span>
</span><span id="line-952"></span><span class="hs-comment">--</span><span>
</span><span id="line-953"></span><span class="hs-comment">-- Used to correctly build and link sources.</span><span>
</span><span id="line-954"></span><span class="hs-keyword">data</span><span> </span><span id="BuildSources"><span class="annot"><a href="Distribution.Simple.GHCJS.html#BuildSources"><span class="hs-identifier hs-var">BuildSources</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="BuildSources"><span class="annot"><a href="Distribution.Simple.GHCJS.html#BuildSources"><span class="hs-identifier hs-var">BuildSources</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-955"></span><span>        </span><span id="cSourcesFiles"><span class="annot"><span class="annottext">BuildSources -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#cSourcesFiles"><span class="hs-identifier hs-var hs-var">cSourcesFiles</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-956"></span><span>        </span><span id="cxxSourceFiles"><span class="annot"><span class="annottext">BuildSources -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#cxxSourceFiles"><span class="hs-identifier hs-var hs-var">cxxSourceFiles</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-957"></span><span>        </span><span id="inputSourceFiles"><span class="annot"><span class="annottext">BuildSources -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceFiles"><span class="hs-identifier hs-var hs-var">inputSourceFiles</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-958"></span><span>        </span><span id="inputSourceModules"><span class="annot"><span class="annottext">BuildSources -&gt; [ModuleName]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceModules"><span class="hs-identifier hs-var hs-var">inputSourceModules</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-959"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-960"></span><span>
</span><span id="line-961"></span><span class="hs-comment">-- | Locate and return the 'BuildSources' required to build and link.</span><span>
</span><span id="line-962"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuildSources"><span class="hs-identifier hs-type">gbuildSources</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-963"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.CabalSpecVersion.html#CabalSpecVersion"><span class="hs-identifier hs-type">CabalSpecVersion</span></a></span><span>
</span><span id="line-964"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-965"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildMode"><span class="hs-identifier hs-type">GBuildMode</span></a></span><span>
</span><span id="line-966"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#BuildSources"><span class="hs-identifier hs-type">BuildSources</span></a></span><span>
</span><span id="line-967"></span><span id="gbuildSources"><span class="annot"><span class="annottext">gbuildSources :: Verbosity
-&gt; CabalSpecVersion -&gt; String -&gt; GBuildMode -&gt; IO BuildSources
</span><a href="Distribution.Simple.GHCJS.html#gbuildSources"><span class="hs-identifier hs-var hs-var">gbuildSources</span></a></span></span><span> </span><span id="local-6989586621679718076"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718076"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718075"><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679718075"><span class="hs-identifier hs-var">specVer</span></a></span></span><span> </span><span id="local-6989586621679718074"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718074"><span class="hs-identifier hs-var">tmpDir</span></a></span></span><span> </span><span id="local-6989586621679718073"><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718073"><span class="hs-identifier hs-var">bm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-968"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718073"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-969"></span><span>      </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-type">GBuildExe</span></a></span><span>  </span><span id="local-6989586621679718072"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718072"><span class="hs-identifier hs-var">exe</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; IO BuildSources
</span><a href="#local-6989586621679718071"><span class="hs-identifier hs-var">exeSources</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718072"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-970"></span><span>      </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-type">GReplExe</span></a></span><span>   </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718070"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718070"><span class="hs-identifier hs-var">exe</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; IO BuildSources
</span><a href="#local-6989586621679718071"><span class="hs-identifier hs-var">exeSources</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718070"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-971"></span><span>      </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span> </span><span id="local-6989586621679718069"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718069"><span class="hs-identifier hs-var">flib</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BuildSources -&gt; IO BuildSources
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildSources -&gt; IO BuildSources)
-&gt; BuildSources -&gt; IO BuildSources
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; BuildSources
</span><a href="#local-6989586621679718068"><span class="hs-identifier hs-var">flibSources</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718069"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-972"></span><span>      </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-type">GReplFLib</span></a></span><span>  </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679718067"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718067"><span class="hs-identifier hs-var">flib</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BuildSources -&gt; IO BuildSources
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildSources -&gt; IO BuildSources)
-&gt; BuildSources -&gt; IO BuildSources
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; BuildSources
</span><a href="#local-6989586621679718068"><span class="hs-identifier hs-var">flibSources</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718067"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-973"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-974"></span><span>    </span><span class="annot"><a href="#local-6989586621679718071"><span class="hs-identifier hs-type">exeSources</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#BuildSources"><span class="hs-identifier hs-type">BuildSources</span></a></span><span>
</span><span id="line-975"></span><span>    </span><span id="local-6989586621679718071"><span class="annot"><span class="annottext">exeSources :: Executable -&gt; IO BuildSources
</span><a href="#local-6989586621679718071"><span class="hs-identifier hs-var hs-var">exeSources</span></a></span></span><span> </span><span id="local-6989586621679718066"><span class="annot"><span class="annottext">exe :: Executable
</span><a href="#local-6989586621679718066"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">buildInfo :: Executable -&gt; BuildInfo
</span><a href="Distribution.Types.Executable.html#buildInfo"><span class="hs-identifier hs-var">buildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718065"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">modulePath :: Executable -&gt; String
</span><a href="Distribution.Types.Executable.html#modulePath"><span class="hs-identifier hs-var">modulePath</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718063"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718063"><span class="hs-identifier hs-var">modPath</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-976"></span><span>      </span><span id="local-6989586621679718062"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718062"><span class="hs-identifier hs-var">main</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; [String] -&gt; String -&gt; IO String
</span><a href="Distribution.Simple.Utils.html#findFileEx"><span class="hs-identifier hs-var">findFileEx</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718076"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718074"><span class="hs-identifier hs-var">tmpDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718063"><span class="hs-identifier hs-var">modPath</span></a></span><span>
</span><span id="line-977"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718059"><span class="annot"><span class="annottext">mainModName :: ModuleName
</span><a href="#local-6989586621679718059"><span class="hs-identifier hs-var hs-var">mainModName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; Maybe ModuleName -&gt; ModuleName
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="Distribution.ModuleName.html#main"><span class="hs-identifier hs-var">ModuleName.main</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe ModuleName -&gt; ModuleName) -&gt; Maybe ModuleName -&gt; ModuleName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Executable -&gt; Maybe ModuleName
</span><a href="Distribution.Simple.GHCJS.html#exeMainModuleName"><span class="hs-identifier hs-var">exeMainModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718066"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-978"></span><span>          </span><span id="local-6989586621679718057"><span class="annot"><span class="annottext">otherModNames :: [ModuleName]
</span><a href="#local-6989586621679718057"><span class="hs-identifier hs-var hs-var">otherModNames</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; [ModuleName]
</span><a href="Distribution.Types.Executable.html#exeModules"><span class="hs-identifier hs-var">exeModules</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718066"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-979"></span><span>
</span><span id="line-980"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="#local-6989586621679718055"><span class="hs-identifier hs-var">isHaskell</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718062"><span class="hs-identifier hs-var">main</span></a></span><span>
</span><span id="line-981"></span><span>        </span><span class="hs-keyword">then</span><span>
</span><span id="line-982"></span><span>          </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="#local-6989586621679718075"><span class="hs-identifier hs-var">specVer</span></a></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion -&gt; CabalSpecVersion -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">CabalSpecVersion
</span><a href="Distribution.CabalSpecVersion.html#CabalSpecV2_0"><span class="hs-identifier hs-var">CabalSpecV2_0</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679718059"><span class="hs-identifier hs-var">mainModName</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; [ModuleName] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679718057"><span class="hs-identifier hs-var">otherModNames</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-983"></span><span>          </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-984"></span><span>             </span><span class="hs-comment">-- The cabal manual clearly states that `other-modules` is</span><span>
</span><span id="line-985"></span><span>             </span><span class="hs-comment">-- intended for non-main modules.  However, there's at least one</span><span>
</span><span id="line-986"></span><span>             </span><span class="hs-comment">-- important package on Hackage (happy-1.19.5) which</span><span>
</span><span id="line-987"></span><span>             </span><span class="hs-comment">-- violates this. We workaround this here so that we don't</span><span>
</span><span id="line-988"></span><span>             </span><span class="hs-comment">-- invoke GHC with e.g.  'ghc --make Main src/Main.hs' which</span><span>
</span><span id="line-989"></span><span>             </span><span class="hs-comment">-- would result in GHC complaining about duplicate Main</span><span>
</span><span id="line-990"></span><span>             </span><span class="hs-comment">-- modules.</span><span>
</span><span id="line-991"></span><span>             </span><span class="hs-comment">--</span><span>
</span><span id="line-992"></span><span>             </span><span class="hs-comment">-- Finally, we only enable this workaround for</span><span>
</span><span id="line-993"></span><span>             </span><span class="hs-comment">-- specVersion &lt; 2, as 'cabal-version:&gt;=2.0' cabal files</span><span>
</span><span id="line-994"></span><span>             </span><span class="hs-comment">-- have no excuse anymore to keep doing it wrong... ;-)</span><span>
</span><span id="line-995"></span><span>             </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#warn"><span class="hs-identifier hs-var">warn</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718076"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Enabling workaround for Main module '&quot;</span></span><span>
</span><span id="line-996"></span><span>                            </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679718059"><span class="hs-identifier hs-var">mainModName</span></a></span><span>
</span><span id="line-997"></span><span>                            </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;' listed in 'other-modules' illegally!&quot;</span></span><span>
</span><span id="line-998"></span><span>
</span><span id="line-999"></span><span>             </span><span class="annot"><span class="annottext">BuildSources -&gt; IO BuildSources
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">BuildSources :: [String] -&gt; [String] -&gt; [String] -&gt; [ModuleName] -&gt; BuildSources
</span><a href="Distribution.Simple.GHCJS.html#BuildSources"><span class="hs-identifier hs-type">BuildSources</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1000"></span><span>                        </span><span class="annot"><span class="annottext">cSourcesFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#cSourcesFiles"><span class="hs-identifier hs-var">cSourcesFiles</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1001"></span><span>                        </span><span class="annot"><span class="annottext">cxxSourceFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#cxxSourceFiles"><span class="hs-identifier hs-var">cxxSourceFiles</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1002"></span><span>                        </span><span class="annot"><span class="annottext">inputSourceFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceFiles"><span class="hs-identifier hs-var">inputSourceFiles</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718062"><span class="hs-identifier hs-var">main</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-1003"></span><span>                        </span><span class="annot"><span class="annottext">inputSourceModules :: [ModuleName]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceModules"><span class="hs-identifier hs-var">inputSourceModules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; Bool) -&gt; [ModuleName] -&gt; [ModuleName]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; ModuleName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679718059"><span class="hs-identifier hs-var">mainModName</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([ModuleName] -&gt; [ModuleName]) -&gt; [ModuleName] -&gt; [ModuleName]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Executable -&gt; [ModuleName]
</span><a href="Distribution.Types.Executable.html#exeModules"><span class="hs-identifier hs-var">exeModules</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718066"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-1004"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-1005"></span><span>
</span><span id="line-1006"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">BuildSources -&gt; IO BuildSources
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">BuildSources :: [String] -&gt; [String] -&gt; [String] -&gt; [ModuleName] -&gt; BuildSources
</span><a href="Distribution.Simple.GHCJS.html#BuildSources"><span class="hs-identifier hs-type">BuildSources</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1007"></span><span>                          </span><span class="annot"><span class="annottext">cSourcesFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#cSourcesFiles"><span class="hs-identifier hs-var">cSourcesFiles</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1008"></span><span>                          </span><span class="annot"><span class="annottext">cxxSourceFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#cxxSourceFiles"><span class="hs-identifier hs-var">cxxSourceFiles</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1009"></span><span>                          </span><span class="annot"><span class="annottext">inputSourceFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceFiles"><span class="hs-identifier hs-var">inputSourceFiles</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718062"><span class="hs-identifier hs-var">main</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-1010"></span><span>                          </span><span class="annot"><span class="annottext">inputSourceModules :: [ModuleName]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceModules"><span class="hs-identifier hs-var">inputSourceModules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; [ModuleName]
</span><a href="Distribution.Types.Executable.html#exeModules"><span class="hs-identifier hs-var">exeModules</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718066"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-1011"></span><span>                      </span><span class="hs-special">}</span><span>
</span><span id="line-1012"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679718053"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718053"><span class="hs-identifier hs-var">csf</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718052"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718052"><span class="hs-identifier hs-var">cxxsf</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1013"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="#local-6989586621679718051"><span class="hs-identifier hs-var">isCxx</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718062"><span class="hs-identifier hs-var">main</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span>       </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718062"><span class="hs-identifier hs-var">main</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1014"></span><span>                   </span><span class="hs-comment">-- if main is not a Haskell source</span><span>
</span><span id="line-1015"></span><span>                   </span><span class="hs-comment">-- and main is not a C++ source</span><span>
</span><span id="line-1016"></span><span>                   </span><span class="hs-comment">-- then we assume that it is a C source</span><span>
</span><span id="line-1017"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718062"><span class="hs-identifier hs-var">main</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>        </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718065"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1018"></span><span>
</span><span id="line-1019"></span><span>             </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">BuildSources -&gt; IO BuildSources
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">BuildSources :: [String] -&gt; [String] -&gt; [String] -&gt; [ModuleName] -&gt; BuildSources
</span><a href="Distribution.Simple.GHCJS.html#BuildSources"><span class="hs-identifier hs-type">BuildSources</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1020"></span><span>                            </span><span class="annot"><span class="annottext">cSourcesFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#cSourcesFiles"><span class="hs-identifier hs-var">cSourcesFiles</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718053"><span class="hs-identifier hs-var">csf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1021"></span><span>                            </span><span class="annot"><span class="annottext">cxxSourceFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#cxxSourceFiles"><span class="hs-identifier hs-var">cxxSourceFiles</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718052"><span class="hs-identifier hs-var">cxxsf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1022"></span><span>                            </span><span class="annot"><span class="annottext">inputSourceFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceFiles"><span class="hs-identifier hs-var">inputSourceFiles</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-1023"></span><span>                            </span><span class="annot"><span class="annottext">inputSourceModules :: [ModuleName]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceModules"><span class="hs-identifier hs-var">inputSourceModules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; [ModuleName]
</span><a href="Distribution.Types.Executable.html#exeModules"><span class="hs-identifier hs-var">exeModules</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679718066"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-1024"></span><span>                        </span><span class="hs-special">}</span><span>
</span><span id="line-1025"></span><span>
</span><span id="line-1026"></span><span>    </span><span class="annot"><a href="#local-6989586621679718068"><span class="hs-identifier hs-type">flibSources</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#BuildSources"><span class="hs-identifier hs-type">BuildSources</span></a></span><span>
</span><span id="line-1027"></span><span>    </span><span id="local-6989586621679718068"><span class="annot"><span class="annottext">flibSources :: ForeignLib -&gt; BuildSources
</span><a href="#local-6989586621679718068"><span class="hs-identifier hs-var hs-var">flibSources</span></a></span></span><span> </span><span id="local-6989586621679718050"><span class="annot"><span class="annottext">flib :: ForeignLib
</span><a href="#local-6989586621679718050"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">foreignLibBuildInfo :: ForeignLib -&gt; BuildInfo
</span><a href="Distribution.Types.ForeignLib.html#foreignLibBuildInfo"><span class="hs-identifier hs-var">foreignLibBuildInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679718048"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718048"><span class="hs-identifier hs-var">bnfo</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1028"></span><span>        </span><span class="annot"><span class="annottext">BuildSources :: [String] -&gt; [String] -&gt; [String] -&gt; [ModuleName] -&gt; BuildSources
</span><a href="Distribution.Simple.GHCJS.html#BuildSources"><span class="hs-identifier hs-type">BuildSources</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1029"></span><span>            </span><span class="annot"><span class="annottext">cSourcesFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#cSourcesFiles"><span class="hs-identifier hs-var">cSourcesFiles</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718048"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1030"></span><span>            </span><span class="annot"><span class="annottext">cxxSourceFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#cxxSourceFiles"><span class="hs-identifier hs-var">cxxSourceFiles</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718048"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1031"></span><span>            </span><span class="annot"><span class="annottext">inputSourceFiles :: [String]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceFiles"><span class="hs-identifier hs-var">inputSourceFiles</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-1032"></span><span>            </span><span class="annot"><span class="annottext">inputSourceModules :: [ModuleName]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceModules"><span class="hs-identifier hs-var">inputSourceModules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; [ModuleName]
</span><a href="Distribution.Types.ForeignLib.html#foreignLibModules"><span class="hs-identifier hs-var">foreignLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679718050"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-1033"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-1034"></span><span>
</span><span id="line-1035"></span><span>    </span><span class="annot"><a href="#local-6989586621679718055"><span class="hs-identifier hs-type">isHaskell</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1036"></span><span>    </span><span id="local-6989586621679718055"><span class="annot"><span class="annottext">isHaskell :: String -&gt; Bool
</span><a href="#local-6989586621679718055"><span class="hs-identifier hs-var hs-var">isHaskell</span></a></span></span><span> </span><span id="local-6989586621679718046"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718046"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-identifier hs-var">elem</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718046"><span class="hs-identifier hs-var">fp</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.hs&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.lhs&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-1037"></span><span>
</span><span id="line-1038"></span><span>    </span><span class="annot"><a href="#local-6989586621679718051"><span class="hs-identifier hs-type">isCxx</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1039"></span><span>    </span><span id="local-6989586621679718051"><span class="annot"><span class="annottext">isCxx :: String -&gt; Bool
</span><a href="#local-6989586621679718051"><span class="hs-identifier hs-var hs-var">isCxx</span></a></span></span><span> </span><span id="local-6989586621679718045"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718045"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-identifier hs-var">elem</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718045"><span class="hs-identifier hs-var">fp</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.cpp&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.cxx&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.c++&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-1040"></span><span>
</span><span id="line-1041"></span><span class="hs-comment">-- | Generic build function. See comment for 'GBuildMode'.</span><span>
</span><span id="line-1042"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#gbuild"><span class="hs-identifier hs-type">gbuild</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Cabal.Flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-1043"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-1044"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildMode"><span class="hs-identifier hs-type">GBuildMode</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1045"></span><span id="gbuild"><span class="annot"><span class="annottext">gbuild :: Verbosity
-&gt; Flag (Maybe Int)
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; GBuildMode
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#gbuild"><span class="hs-identifier hs-var hs-var">gbuild</span></a></span></span><span> </span><span id="local-6989586621679718044"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679718043"><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718043"><span class="hs-identifier hs-var">numJobs</span></a></span></span><span> </span><span id="local-6989586621679718042"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718042"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679718041"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679718040"><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span></span><span> </span><span id="local-6989586621679718039"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718039"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1046"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679718038"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718038"><span class="hs-identifier hs-var">ghcjsProg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program -&gt; ProgramDb -&gt; IO (ConfiguredProgram, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgram"><span class="hs-identifier hs-var">requireProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1047"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718035"><span class="annot"><span class="annottext">replFlags :: [String]
</span><a href="#local-6989586621679718035"><span class="hs-identifier hs-var hs-var">replFlags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1048"></span><span>          </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-type">GReplExe</span></a></span><span> </span><span id="local-6989586621679718034"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718034"><span class="hs-identifier hs-var">flags</span></a></span></span><span> </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718034"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-1049"></span><span>          </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-type">GReplFLib</span></a></span><span> </span><span id="local-6989586621679718033"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718033"><span class="hs-identifier hs-var">flags</span></a></span></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718033"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-1050"></span><span>          </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-type">GBuildExe</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[String]
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-1051"></span><span>          </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[String]
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-1052"></span><span>      </span><span id="local-6989586621679718032"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679718032"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1053"></span><span>      </span><span id="local-6989586621679718031"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621679718031"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1054"></span><span>      </span><span id="local-6989586621679718030"><span class="annot"><span class="annottext">implInfo :: GhcImplInfo
</span><a href="#local-6989586621679718030"><span class="hs-identifier hs-var hs-var">implInfo</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; GhcImplInfo
</span><a href="Distribution.Simple.GHC.ImplInfo.html#getImplInfo"><span class="hs-identifier hs-var">getImplInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718032"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-1055"></span><span>      </span><span id="local-6989586621679718029"><span class="annot"><span class="annottext">runGhcProg :: GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718029"><span class="hs-identifier hs-var hs-var">runGhcProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; ConfiguredProgram -&gt; Compiler -&gt; Platform -&gt; GhcOptions -&gt; IO ()
</span><a href="Distribution.Simple.Program.GHC.html#runGHC"><span class="hs-identifier hs-var">runGHC</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679718038"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718032"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679718031"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-1056"></span><span>
</span><span id="line-1057"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679718028"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679718027"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718027"><span class="hs-identifier hs-var">threaded</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1058"></span><span>        </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; (BuildInfo, Bool)
</span><a href="Distribution.Simple.GHCJS.html#popThreadedFlag"><span class="hs-identifier hs-var">popThreadedFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GBuildMode -&gt; BuildInfo
</span><a href="Distribution.Simple.GHCJS.html#gbuildInfo"><span class="hs-identifier hs-var">gbuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1059"></span><span>        </span><span class="annot"><span class="annottext">GBuildMode
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GBuildMode -&gt; BuildInfo
</span><a href="Distribution.Simple.GHCJS.html#gbuildInfo"><span class="hs-identifier hs-var">gbuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span>
</span><span id="line-1060"></span><span>
</span><span id="line-1061"></span><span>  </span><span class="hs-comment">-- the name that GHC really uses (e.g., with .exe on Windows for executables)</span><span>
</span><span id="line-1062"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718025"><span class="annot"><span class="annottext">targetName :: String
</span><a href="#local-6989586621679718025"><span class="hs-identifier hs-var hs-var">targetName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; GBuildMode -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#gbuildTargetName"><span class="hs-identifier hs-var">gbuildTargetName</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span>
</span><span id="line-1063"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718024"><span class="annot"><span class="annottext">targetDir :: String
</span><a href="#local-6989586621679718024"><span class="hs-identifier hs-var hs-var">targetDir</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GBuildMode -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#gbuildName"><span class="hs-identifier hs-var">gbuildName</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1064"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718022"><span class="annot"><span class="annottext">tmpDir :: String
</span><a href="#local-6989586621679718022"><span class="hs-identifier hs-var hs-var">tmpDir</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718024"><span class="hs-identifier hs-var">targetDir</span></a></span><span>    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GBuildMode -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#gbuildName"><span class="hs-identifier hs-var">gbuildName</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-tmp&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1065"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#createDirectoryIfMissingVerbose"><span class="hs-identifier hs-var">createDirectoryIfMissingVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718024"><span class="hs-identifier hs-var">targetDir</span></a></span><span>
</span><span id="line-1066"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#createDirectoryIfMissingVerbose"><span class="hs-identifier hs-var">createDirectoryIfMissingVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718022"><span class="hs-identifier hs-var">tmpDir</span></a></span><span>
</span><span id="line-1067"></span><span>
</span><span id="line-1068"></span><span>  </span><span class="hs-comment">-- TODO: do we need to put hs-boot files into place for mutually recursive</span><span>
</span><span id="line-1069"></span><span>  </span><span class="hs-comment">-- modules?  FIX: what about exeName.hi-boot?</span><span>
</span><span id="line-1070"></span><span>
</span><span id="line-1071"></span><span>  </span><span class="hs-comment">-- Determine if program coverage should be enabled and if so, what</span><span>
</span><span id="line-1072"></span><span>  </span><span class="hs-comment">-- '-hpcdir' should be.</span><span>
</span><span id="line-1073"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718021"><span class="annot"><span class="annottext">isCoverageEnabled :: Bool
</span><a href="#local-6989586621679718021"><span class="hs-identifier hs-var hs-var">isCoverageEnabled</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#exeCoverage"><span class="hs-identifier hs-var hs-var">exeCoverage</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1074"></span><span>      </span><span id="local-6989586621679718017"><span class="annot"><span class="annottext">distPref :: String
</span><a href="#local-6989586621679718017"><span class="hs-identifier hs-var hs-var">distPref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String -&gt; String
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(Flag String -&gt; String) -&gt; Flag String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConfigFlags -&gt; Flag String
</span><a href="Distribution.Simple.Setup.html#configDistPref"><span class="hs-identifier hs-var hs-var">configDistPref</span></a></span><span> </span><span class="annot"><span class="annottext">(ConfigFlags -&gt; Flag String) -&gt; ConfigFlags -&gt; Flag String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ConfigFlags
</span><a href="Distribution.Types.LocalBuildInfo.html#configFlags"><span class="hs-identifier hs-var hs-var">configFlags</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1075"></span><span>      </span><span id="local-6989586621679718014"><span class="annot"><span class="annottext">hpcdir :: Way -&gt; Flag String
</span><a href="#local-6989586621679718014"><span class="hs-identifier hs-var hs-var">hpcdir</span></a></span></span><span> </span><span id="local-6989586621679718013"><span class="annot"><span class="annottext">Way
</span><a href="#local-6989586621679718013"><span class="hs-identifier hs-var">way</span></a></span></span><span>
</span><span id="line-1076"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GBuildMode -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#gbuildIsRepl"><span class="hs-identifier hs-var">gbuildIsRepl</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>  </span><span class="hs-comment">-- HPC is not supported in ghci</span><span>
</span><span id="line-1077"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718021"><span class="hs-identifier hs-var">isCoverageEnabled</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Flag String) -&gt; String -&gt; Flag String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Way -&gt; String -&gt; String
</span><a href="Distribution.Simple.Hpc.html#mixDir"><span class="hs-identifier hs-var">Hpc.mixDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718017"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="#local-6989586621679718013"><span class="hs-identifier hs-var">way</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GBuildMode -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#gbuildName"><span class="hs-identifier hs-var">gbuildName</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1078"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-1079"></span><span>
</span><span id="line-1080"></span><span>  </span><span id="local-6989586621679718012"><span class="annot"><span class="annottext">NubListR String
</span><a href="#local-6989586621679718012"><span class="hs-identifier hs-var">rpaths</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; IO (NubListR String)
</span><a href="Distribution.Simple.GHCJS.html#getRPaths"><span class="hs-identifier hs-var">getRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718039"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-1081"></span><span>  </span><span id="local-6989586621679718011"><span class="annot"><span class="annottext">BuildSources
</span><a href="#local-6989586621679718011"><span class="hs-identifier hs-var">buildSources</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; CabalSpecVersion -&gt; String -&gt; GBuildMode -&gt; IO BuildSources
</span><a href="Distribution.Simple.GHCJS.html#gbuildSources"><span class="hs-identifier hs-var">gbuildSources</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; CabalSpecVersion
</span><a href="Distribution.Types.PackageDescription.html#specVersion"><span class="hs-identifier hs-var hs-var">specVersion</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679718042"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718022"><span class="hs-identifier hs-var">tmpDir</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span>
</span><span id="line-1082"></span><span>
</span><span id="line-1083"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679718009"><span class="annot"><span class="annottext">cSrcs :: [String]
</span><a href="#local-6989586621679718009"><span class="hs-identifier hs-var hs-var">cSrcs</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildSources -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#cSourcesFiles"><span class="hs-identifier hs-var hs-var">cSourcesFiles</span></a></span><span> </span><span class="annot"><span class="annottext">BuildSources
</span><a href="#local-6989586621679718011"><span class="hs-identifier hs-var">buildSources</span></a></span><span>
</span><span id="line-1084"></span><span>      </span><span id="local-6989586621679718008"><span class="annot"><span class="annottext">cxxSrcs :: [String]
</span><a href="#local-6989586621679718008"><span class="hs-identifier hs-var hs-var">cxxSrcs</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildSources -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#cxxSourceFiles"><span class="hs-identifier hs-var hs-var">cxxSourceFiles</span></a></span><span> </span><span class="annot"><span class="annottext">BuildSources
</span><a href="#local-6989586621679718011"><span class="hs-identifier hs-var">buildSources</span></a></span><span>
</span><span id="line-1085"></span><span>      </span><span id="local-6989586621679718007"><span class="annot"><span class="annottext">inputFiles :: [String]
</span><a href="#local-6989586621679718007"><span class="hs-identifier hs-var hs-var">inputFiles</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildSources -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceFiles"><span class="hs-identifier hs-var hs-var">inputSourceFiles</span></a></span><span> </span><span class="annot"><span class="annottext">BuildSources
</span><a href="#local-6989586621679718011"><span class="hs-identifier hs-var">buildSources</span></a></span><span>
</span><span id="line-1086"></span><span>      </span><span id="local-6989586621679718006"><span class="annot"><span class="annottext">inputModules :: [ModuleName]
</span><a href="#local-6989586621679718006"><span class="hs-identifier hs-var hs-var">inputModules</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildSources -&gt; [ModuleName]
</span><a href="Distribution.Simple.GHCJS.html#inputSourceModules"><span class="hs-identifier hs-var hs-var">inputSourceModules</span></a></span><span> </span><span class="annot"><span class="annottext">BuildSources
</span><a href="#local-6989586621679718011"><span class="hs-identifier hs-var">buildSources</span></a></span><span>
</span><span id="line-1087"></span><span>      </span><span id="local-6989586621679718005"><span class="annot"><span class="annottext">isGhcDynamic :: Bool
</span><a href="#local-6989586621679718005"><span class="hs-identifier hs-var hs-var">isGhcDynamic</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#isDynamic"><span class="hs-identifier hs-var">isDynamic</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718032"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-1088"></span><span>      </span><span id="local-6989586621679718004"><span class="annot"><span class="annottext">dynamicTooSupported :: Bool
</span><a href="#local-6989586621679718004"><span class="hs-identifier hs-var hs-var">dynamicTooSupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#supportsDynamicToo"><span class="hs-identifier hs-var">supportsDynamicToo</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718032"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-1089"></span><span>      </span><span id="local-6989586621679718003"><span class="annot"><span class="annottext">cObjs :: [String]
</span><a href="#local-6989586621679718003"><span class="hs-identifier hs-var hs-var">cObjs</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-operator hs-var">`replaceExtension`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#objExtension"><span class="hs-identifier hs-var">objExtension</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718009"><span class="hs-identifier hs-var">cSrcs</span></a></span><span>
</span><span id="line-1090"></span><span>      </span><span id="local-6989586621679718002"><span class="annot"><span class="annottext">cxxObjs :: [String]
</span><a href="#local-6989586621679718002"><span class="hs-identifier hs-var hs-var">cxxObjs</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-operator hs-var">`replaceExtension`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="Distribution.Simple.BuildPaths.html#objExtension"><span class="hs-identifier hs-var">objExtension</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718008"><span class="hs-identifier hs-var">cxxSrcs</span></a></span><span>
</span><span id="line-1091"></span><span>      </span><span id="local-6989586621679718001"><span class="annot"><span class="annottext">needDynamic :: Bool
</span><a href="#local-6989586621679718001"><span class="hs-identifier hs-var hs-var">needDynamic</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; GBuildMode -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#gbuildNeedDynamic"><span class="hs-identifier hs-var">gbuildNeedDynamic</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span>
</span><span id="line-1092"></span><span>      </span><span id="local-6989586621679718000"><span class="annot"><span class="annottext">needProfiling :: Bool
</span><a href="#local-6989586621679718000"><span class="hs-identifier hs-var hs-var">needProfiling</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withProfExe"><span class="hs-identifier hs-var hs-var">withProfExe</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1093"></span><span>
</span><span id="line-1094"></span><span>  </span><span class="hs-comment">-- build executables</span><span>
</span><span id="line-1095"></span><span>      </span><span id="local-6989586621679717993"><span class="annot"><span class="annottext">baseOpts :: GhcOptions
</span><a href="#local-6989586621679717993"><span class="hs-identifier hs-var hs-var">baseOpts</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Verbosity
-&gt; LocalBuildInfo
-&gt; BuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; GhcOptions
</span><a href="Distribution.Simple.GHCJS.html#componentGhcOptions"><span class="hs-identifier hs-var">componentGhcOptions</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718039"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718022"><span class="hs-identifier hs-var">tmpDir</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1096"></span><span>                    </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1097"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptMode :: Flag GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptMode"><span class="hs-identifier hs-var">ghcOptMode</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcMode -&gt; Flag GhcMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcModeMake"><span class="hs-identifier hs-var">GhcModeMake</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1098"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptInputFiles :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptInputFiles"><span class="hs-identifier hs-var">ghcOptInputFiles</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718007"><span class="hs-identifier hs-var">inputFiles</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1099"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptInputModules :: NubListR ModuleName
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptInputModules"><span class="hs-identifier hs-var">ghcOptInputModules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; NubListR ModuleName
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679718006"><span class="hs-identifier hs-var">inputModules</span></a></span><span>
</span><span id="line-1100"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-1101"></span><span>      </span><span id="local-6989586621679717990"><span class="annot"><span class="annottext">staticOpts :: GhcOptions
</span><a href="#local-6989586621679717990"><span class="hs-identifier hs-var hs-var">staticOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717993"><span class="hs-identifier hs-var">baseOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1102"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptDynLinkMode :: Flag GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynLinkMode"><span class="hs-identifier hs-var">ghcOptDynLinkMode</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode -&gt; Flag GhcDynLinkMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcStaticOnly"><span class="hs-identifier hs-var">GhcStaticOnly</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1103"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHPCDir :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHPCDir"><span class="hs-identifier hs-var">ghcOptHPCDir</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718014"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Vanilla"><span class="hs-identifier hs-var">Hpc.Vanilla</span></a></span><span>
</span><span id="line-1104"></span><span>                   </span><span class="hs-special">}</span><span>
</span><span id="line-1105"></span><span>      </span><span id="local-6989586621679717986"><span class="annot"><span class="annottext">profOpts :: GhcOptions
</span><a href="#local-6989586621679717986"><span class="hs-identifier hs-var hs-var">profOpts</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717993"><span class="hs-identifier hs-var">baseOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1106"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptProfilingMode :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptProfilingMode"><span class="hs-identifier hs-var">ghcOptProfilingMode</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-1107"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptProfilingAuto :: Flag GhcProfAuto
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptProfilingAuto"><span class="hs-identifier hs-var">ghcOptProfilingAuto</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ProfDetailLevel -&gt; Flag GhcProfAuto
</span><a href="Distribution.Simple.GHC.Internal.html#profDetailLevelFlag"><span class="hs-identifier hs-var">Internal.profDetailLevelFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1108"></span><span>                                             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProfDetailLevel
</span><a href="Distribution.Types.LocalBuildInfo.html#withProfExeDetail"><span class="hs-identifier hs-var hs-var">withProfExeDetail</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1109"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHiSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHiSuffix"><span class="hs-identifier hs-var">ghcOptHiSuffix</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;p_hi&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1110"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptObjSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptObjSuffix"><span class="hs-identifier hs-var">ghcOptObjSuffix</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;p_o&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1111"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcProfOptions"><span class="hs-identifier hs-var">hcProfOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1112"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHPCDir :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHPCDir"><span class="hs-identifier hs-var">ghcOptHPCDir</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718014"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Prof"><span class="hs-identifier hs-var">Hpc.Prof</span></a></span><span>
</span><span id="line-1113"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-1114"></span><span>      </span><span id="local-6989586621679717980"><span class="annot"><span class="annottext">dynOpts :: GhcOptions
</span><a href="#local-6989586621679717980"><span class="hs-identifier hs-var hs-var">dynOpts</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717993"><span class="hs-identifier hs-var">baseOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1115"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptDynLinkMode :: Flag GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynLinkMode"><span class="hs-identifier hs-var">ghcOptDynLinkMode</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode -&gt; Flag GhcDynLinkMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcDynamicOnly"><span class="hs-identifier hs-var">GhcDynamicOnly</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1116"></span><span>                      </span><span class="hs-comment">-- TODO: Does it hurt to set -fPIC for executables?</span><span>
</span><span id="line-1117"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptFPic :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptFPic"><span class="hs-identifier hs-var">ghcOptFPic</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-1118"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHiSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHiSuffix"><span class="hs-identifier hs-var">ghcOptHiSuffix</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dyn_hi&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1119"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptObjSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptObjSuffix"><span class="hs-identifier hs-var">ghcOptObjSuffix</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dyn_o&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1120"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcSharedOptions"><span class="hs-identifier hs-var">hcSharedOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1121"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHPCDir :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHPCDir"><span class="hs-identifier hs-var">ghcOptHPCDir</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718014"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Dyn"><span class="hs-identifier hs-var">Hpc.Dyn</span></a></span><span>
</span><span id="line-1122"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-1123"></span><span>      </span><span id="local-6989586621679717977"><span class="annot"><span class="annottext">dynTooOpts :: GhcOptions
</span><a href="#local-6989586621679717977"><span class="hs-identifier hs-var hs-var">dynTooOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717990"><span class="hs-identifier hs-var">staticOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1124"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptDynLinkMode :: Flag GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynLinkMode"><span class="hs-identifier hs-var">ghcOptDynLinkMode</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode -&gt; Flag GhcDynLinkMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcStaticAndDynamic"><span class="hs-identifier hs-var">GhcStaticAndDynamic</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1125"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptDynHiSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynHiSuffix"><span class="hs-identifier hs-var">ghcOptDynHiSuffix</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dyn_hi&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1126"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptDynObjSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynObjSuffix"><span class="hs-identifier hs-var">ghcOptDynObjSuffix</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dyn_o&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1127"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptHPCDir :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHPCDir"><span class="hs-identifier hs-var">ghcOptHPCDir</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Way -&gt; Flag String
</span><a href="#local-6989586621679718014"><span class="hs-identifier hs-var">hpcdir</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="Distribution.Simple.Hpc.html#Dyn"><span class="hs-identifier hs-var">Hpc.Dyn</span></a></span><span>
</span><span id="line-1128"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-1129"></span><span>      </span><span id="local-6989586621679717970"><span class="annot"><span class="annottext">linkerOpts :: GhcOptions
</span><a href="#local-6989586621679717970"><span class="hs-identifier hs-var hs-var">linkerOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1130"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptLinkOptions :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkOptions"><span class="hs-identifier hs-var">ghcOptLinkOptions</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#ldOptions"><span class="hs-identifier hs-var hs-var">PD.ldOptions</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1131"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptLinkLibs :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkLibs"><span class="hs-identifier hs-var">ghcOptLinkLibs</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibs"><span class="hs-identifier hs-var hs-var">extraLibs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1132"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptLinkLibPath :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkLibPath"><span class="hs-identifier hs-var">ghcOptLinkLibPath</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; NubListR String) -&gt; [String] -&gt; NubListR String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibDirs"><span class="hs-identifier hs-var hs-var">extraLibDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1133"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptLinkFrameworks :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkFrameworks"><span class="hs-identifier hs-var">ghcOptLinkFrameworks</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; NubListR String) -&gt; [String] -&gt; NubListR String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1134"></span><span>                                                </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#frameworks"><span class="hs-identifier hs-var hs-var">PD.frameworks</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1135"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptLinkFrameworkDirs :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkFrameworkDirs"><span class="hs-identifier hs-var">ghcOptLinkFrameworkDirs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; NubListR String) -&gt; [String] -&gt; NubListR String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1136"></span><span>                                                </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraFrameworkDirs"><span class="hs-identifier hs-var hs-var">PD.extraFrameworkDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1137"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptInputFiles :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptInputFiles"><span class="hs-identifier hs-var">ghcOptInputFiles</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span>
</span><span id="line-1138"></span><span>                                             </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718022"><span class="hs-identifier hs-var">tmpDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717967"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679717967"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717967"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718003"><span class="hs-identifier hs-var">cObjs</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718002"><span class="hs-identifier hs-var">cxxObjs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1139"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-1140"></span><span>      </span><span id="local-6989586621679717965"><span class="annot"><span class="annottext">dynLinkerOpts :: GhcOptions
</span><a href="#local-6989586621679717965"><span class="hs-identifier hs-var hs-var">dynLinkerOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1141"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptRPaths :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptRPaths"><span class="hs-identifier hs-var">ghcOptRPaths</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NubListR String
</span><a href="#local-6989586621679718012"><span class="hs-identifier hs-var">rpaths</span></a></span><span>
</span><span id="line-1142"></span><span>                   </span><span class="hs-special">}</span><span>
</span><span id="line-1143"></span><span>      </span><span id="local-6989586621679717959"><span class="annot"><span class="annottext">replOpts :: GhcOptions
</span><a href="#local-6989586621679717959"><span class="hs-identifier hs-var hs-var">replOpts</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717993"><span class="hs-identifier hs-var">baseOpts</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1144"></span><span>                    </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="Distribution.Simple.GHC.Internal.html#filterGhciFlags"><span class="hs-identifier hs-var">Internal.filterGhciFlags</span></a></span><span>
</span><span id="line-1145"></span><span>                                             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcOptions -&gt; [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var hs-var">ghcOptExtra</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717993"><span class="hs-identifier hs-var">baseOpts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1146"></span><span>                                             </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718035"><span class="hs-identifier hs-var">replFlags</span></a></span><span>
</span><span id="line-1147"></span><span>                   </span><span class="hs-special">}</span><span>
</span><span id="line-1148"></span><span>                   </span><span class="hs-comment">-- For a normal compile we do separate invocations of ghc for</span><span>
</span><span id="line-1149"></span><span>                   </span><span class="hs-comment">-- compiling as for linking. But for repl we have to do just</span><span>
</span><span id="line-1150"></span><span>                   </span><span class="hs-comment">-- the one invocation, so that one has to include all the</span><span>
</span><span id="line-1151"></span><span>                   </span><span class="hs-comment">-- linker stuff too, like -l flags and any .o files from C</span><span>
</span><span id="line-1152"></span><span>                   </span><span class="hs-comment">-- files etc.</span><span>
</span><span id="line-1153"></span><span>                   </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717970"><span class="hs-identifier hs-var">linkerOpts</span></a></span><span>
</span><span id="line-1154"></span><span>                   </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1155"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptMode :: Flag GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptMode"><span class="hs-identifier hs-var">ghcOptMode</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcMode -&gt; Flag GhcMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcModeInteractive"><span class="hs-identifier hs-var">GhcModeInteractive</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1156"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptOptimisation :: Flag GhcOptimisation
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptOptimisation"><span class="hs-identifier hs-var">ghcOptOptimisation</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptimisation -&gt; Flag GhcOptimisation
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptimisation
</span><a href="Distribution.Simple.Program.GHC.html#GhcNoOptimisation"><span class="hs-identifier hs-var">GhcNoOptimisation</span></a></span><span>
</span><span id="line-1157"></span><span>                     </span><span class="hs-special">}</span><span>
</span><span id="line-1158"></span><span>      </span><span id="local-6989586621679717955"><span class="annot"><span class="annottext">commonOpts :: GhcOptions
</span><a href="#local-6989586621679717955"><span class="hs-identifier hs-var hs-var">commonOpts</span></a></span></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718000"><span class="hs-identifier hs-var">needProfiling</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717986"><span class="hs-identifier hs-var">profOpts</span></a></span><span>
</span><span id="line-1159"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718001"><span class="hs-identifier hs-var">needDynamic</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717980"><span class="hs-identifier hs-var">dynOpts</span></a></span><span>
</span><span id="line-1160"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717990"><span class="hs-identifier hs-var">staticOpts</span></a></span><span>
</span><span id="line-1161"></span><span>      </span><span id="local-6989586621679717954"><span class="annot"><span class="annottext">compileOpts :: GhcOptions
</span><a href="#local-6989586621679717954"><span class="hs-identifier hs-var hs-var">compileOpts</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717953"><span class="hs-identifier hs-var">useDynToo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717977"><span class="hs-identifier hs-var">dynTooOpts</span></a></span><span>
</span><span id="line-1162"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717955"><span class="hs-identifier hs-var">commonOpts</span></a></span><span>
</span><span id="line-1163"></span><span>      </span><span id="local-6989586621679717952"><span class="annot"><span class="annottext">withStaticExe :: Bool
</span><a href="#local-6989586621679717952"><span class="hs-identifier hs-var hs-var">withStaticExe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718000"><span class="hs-identifier hs-var">needProfiling</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718001"><span class="hs-identifier hs-var">needDynamic</span></a></span><span>
</span><span id="line-1164"></span><span>
</span><span id="line-1165"></span><span>      </span><span class="hs-comment">-- For building exe's that use TH with -prof or -dynamic we actually have</span><span>
</span><span id="line-1166"></span><span>      </span><span class="hs-comment">-- to build twice, once without -prof/-dynamic and then again with</span><span>
</span><span id="line-1167"></span><span>      </span><span class="hs-comment">-- -prof/-dynamic. This is because the code that TH needs to run at</span><span>
</span><span id="line-1168"></span><span>      </span><span class="hs-comment">-- compile time needs to be the vanilla ABI so it can be loaded up and run</span><span>
</span><span id="line-1169"></span><span>      </span><span class="hs-comment">-- by the compiler.</span><span>
</span><span id="line-1170"></span><span>      </span><span class="hs-comment">-- With dynamic-by-default GHC the TH object files loaded at compile-time</span><span>
</span><span id="line-1171"></span><span>      </span><span class="hs-comment">-- need to be .dyn_o instead of .o.</span><span>
</span><span id="line-1172"></span><span>      </span><span id="local-6989586621679717951"><span class="annot"><span class="annottext">doingTH :: Bool
</span><a href="#local-6989586621679717951"><span class="hs-identifier hs-var hs-var">doingTH</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; Bool
</span><a href="Distribution.Types.BuildInfo.html#usesTemplateHaskellOrQQ"><span class="hs-identifier hs-var">usesTemplateHaskellOrQQ</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span>
</span><span id="line-1173"></span><span>      </span><span class="hs-comment">-- Should we use -dynamic-too instead of compiling twice?</span><span>
</span><span id="line-1174"></span><span>      </span><span id="local-6989586621679717953"><span class="annot"><span class="annottext">useDynToo :: Bool
</span><a href="#local-6989586621679717953"><span class="hs-identifier hs-var hs-var">useDynToo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718004"><span class="hs-identifier hs-var">dynamicTooSupported</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718005"><span class="hs-identifier hs-var">isGhcDynamic</span></a></span><span>
</span><span id="line-1175"></span><span>                  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717951"><span class="hs-identifier hs-var">doingTH</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717952"><span class="hs-identifier hs-var">withStaticExe</span></a></span><span>
</span><span id="line-1176"></span><span>                  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcSharedOptions"><span class="hs-identifier hs-var">hcSharedOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1177"></span><span>      </span><span id="local-6989586621679717949"><span class="annot"><span class="annottext">compileTHOpts :: GhcOptions
</span><a href="#local-6989586621679717949"><span class="hs-identifier hs-var hs-var">compileTHOpts</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718005"><span class="hs-identifier hs-var">isGhcDynamic</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717980"><span class="hs-identifier hs-var">dynOpts</span></a></span><span>
</span><span id="line-1178"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717990"><span class="hs-identifier hs-var">staticOpts</span></a></span><span>
</span><span id="line-1179"></span><span>      </span><span id="local-6989586621679717948"><span class="annot"><span class="annottext">compileForTH :: Bool
</span><a href="#local-6989586621679717948"><span class="hs-identifier hs-var hs-var">compileForTH</span></a></span></span><span>
</span><span id="line-1180"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GBuildMode -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#gbuildIsRepl"><span class="hs-identifier hs-var">gbuildIsRepl</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1181"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717953"><span class="hs-identifier hs-var">useDynToo</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1182"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718005"><span class="hs-identifier hs-var">isGhcDynamic</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717951"><span class="hs-identifier hs-var">doingTH</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718000"><span class="hs-identifier hs-var">needProfiling</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717952"><span class="hs-identifier hs-var">withStaticExe</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1183"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717951"><span class="hs-identifier hs-var">doingTH</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718000"><span class="hs-identifier hs-var">needProfiling</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718001"><span class="hs-identifier hs-var">needDynamic</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1184"></span><span>
</span><span id="line-1185"></span><span>   </span><span class="hs-comment">-- Build static/dynamic object files for TH, if needed.</span><span>
</span><span id="line-1186"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717948"><span class="hs-identifier hs-var">compileForTH</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1187"></span><span>    </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718029"><span class="hs-identifier hs-var">runGhcProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717949"><span class="hs-identifier hs-var">compileTHOpts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ghcOptNoLink :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptNoLink"><span class="hs-identifier hs-var">ghcOptNoLink</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1188"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ghcOptNumJobs :: Flag (Maybe Int)
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptNumJobs"><span class="hs-identifier hs-var">ghcOptNumJobs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718043"><span class="hs-identifier hs-var">numJobs</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1189"></span><span>
</span><span id="line-1190"></span><span>  </span><span class="hs-comment">-- Do not try to build anything if there are no input files.</span><span>
</span><span id="line-1191"></span><span>  </span><span class="hs-comment">-- This can happen if the cabal file ends up with only cSrcs</span><span>
</span><span id="line-1192"></span><span>  </span><span class="hs-comment">-- but no Haskell modules.</span><span>
</span><span id="line-1193"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718007"><span class="hs-identifier hs-var">inputFiles</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679718006"><span class="hs-identifier hs-var">inputModules</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1194"></span><span>          </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">GBuildMode -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#gbuildIsRepl"><span class="hs-identifier hs-var">gbuildIsRepl</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1195"></span><span>    </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718029"><span class="hs-identifier hs-var">runGhcProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717954"><span class="hs-identifier hs-var">compileOpts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ghcOptNoLink :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptNoLink"><span class="hs-identifier hs-var">ghcOptNoLink</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1196"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ghcOptNumJobs :: Flag (Maybe Int)
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptNumJobs"><span class="hs-identifier hs-var">ghcOptNumJobs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag (Maybe Int)
</span><a href="#local-6989586621679718043"><span class="hs-identifier hs-var">numJobs</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1197"></span><span>
</span><span id="line-1198"></span><span>  </span><span class="hs-comment">-- build any C++ sources</span><span>
</span><span id="line-1199"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718008"><span class="hs-identifier hs-var">cxxSrcs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1200"></span><span>   </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Building C++ Sources...&quot;</span></span><span>
</span><span id="line-1201"></span><span>   </span><span class="annot"><span class="annottext">[IO ()] -&gt; IO ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Foldable t, Monad m) =&gt;
t (m a) -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#sequence_"><span class="hs-identifier hs-var">sequence_</span></a></span><span>
</span><span id="line-1202"></span><span>     </span><span class="hs-special">[</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717945"><span class="annot"><span class="annottext">baseCxxOpts :: GhcOptions
</span><a href="#local-6989586621679717945"><span class="hs-identifier hs-var hs-var">baseCxxOpts</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; GhcImplInfo
-&gt; LocalBuildInfo
-&gt; BuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; String
-&gt; GhcOptions
</span><a href="Distribution.Simple.GHC.Internal.html#componentCxxGhcOptions"><span class="hs-identifier hs-var">Internal.componentCxxGhcOptions</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679718030"><span class="hs-identifier hs-var">implInfo</span></a></span><span>
</span><span id="line-1203"></span><span>                               </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718039"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718022"><span class="hs-identifier hs-var">tmpDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717943"><span class="hs-identifier hs-var">filename</span></a></span><span>
</span><span id="line-1204"></span><span>              </span><span id="local-6989586621679717942"><span class="annot"><span class="annottext">vanillaCxxOpts :: GhcOptions
</span><a href="#local-6989586621679717942"><span class="hs-identifier hs-var hs-var">vanillaCxxOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718005"><span class="hs-identifier hs-var">isGhcDynamic</span></a></span><span>
</span><span id="line-1205"></span><span>                                </span><span class="hs-comment">-- Dynamic GHC requires C++ sources to be built</span><span>
</span><span id="line-1206"></span><span>                                </span><span class="hs-comment">-- with -fPIC for REPL to work. See #2207.</span><span>
</span><span id="line-1207"></span><span>                               </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717945"><span class="hs-identifier hs-var">baseCxxOpts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ghcOptFPic :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptFPic"><span class="hs-identifier hs-var">ghcOptFPic</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1208"></span><span>                               </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717945"><span class="hs-identifier hs-var">baseCxxOpts</span></a></span><span>
</span><span id="line-1209"></span><span>              </span><span id="local-6989586621679717939"><span class="annot"><span class="annottext">profCxxOpts :: GhcOptions
</span><a href="#local-6989586621679717939"><span class="hs-identifier hs-var hs-var">profCxxOpts</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717942"><span class="hs-identifier hs-var">vanillaCxxOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1210"></span><span>                                 </span><span class="annot"><span class="annottext">ghcOptProfilingMode :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptProfilingMode"><span class="hs-identifier hs-var">ghcOptProfilingMode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1211"></span><span>                               </span><span class="hs-special">}</span><span>
</span><span id="line-1212"></span><span>              </span><span id="local-6989586621679717936"><span class="annot"><span class="annottext">sharedCxxOpts :: GhcOptions
</span><a href="#local-6989586621679717936"><span class="hs-identifier hs-var hs-var">sharedCxxOpts</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717942"><span class="hs-identifier hs-var">vanillaCxxOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1213"></span><span>                                 </span><span class="annot"><span class="annottext">ghcOptFPic :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptFPic"><span class="hs-identifier hs-var">ghcOptFPic</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-1214"></span><span>                                 </span><span class="annot"><span class="annottext">ghcOptDynLinkMode :: Flag GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynLinkMode"><span class="hs-identifier hs-var">ghcOptDynLinkMode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode -&gt; Flag GhcDynLinkMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcDynamicOnly"><span class="hs-identifier hs-var">GhcDynamicOnly</span></a></span><span>
</span><span id="line-1215"></span><span>                               </span><span class="hs-special">}</span><span>
</span><span id="line-1216"></span><span>              </span><span id="local-6989586621679717935"><span class="annot"><span class="annottext">opts :: GhcOptions
</span><a href="#local-6989586621679717935"><span class="hs-identifier hs-var hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718000"><span class="hs-identifier hs-var">needProfiling</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717939"><span class="hs-identifier hs-var">profCxxOpts</span></a></span><span>
</span><span id="line-1217"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718001"><span class="hs-identifier hs-var">needDynamic</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717936"><span class="hs-identifier hs-var">sharedCxxOpts</span></a></span><span>
</span><span id="line-1218"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717942"><span class="hs-identifier hs-var">vanillaCxxOpts</span></a></span><span>
</span><span id="line-1219"></span><span>              </span><span class="hs-comment">-- TODO: Placing all Haskell, C, &amp; C++ objects in a single directory</span><span>
</span><span id="line-1220"></span><span>              </span><span class="hs-comment">--       Has the potential for file collisions. In general we would</span><span>
</span><span id="line-1221"></span><span>              </span><span class="hs-comment">--       consider this a user error. However, we should strive to</span><span>
</span><span id="line-1222"></span><span>              </span><span class="hs-comment">--       add a warning if this occurs.</span><span>
</span><span id="line-1223"></span><span>              </span><span id="local-6989586621679717932"><span class="annot"><span class="annottext">odir :: String
</span><a href="#local-6989586621679717932"><span class="hs-identifier hs-var hs-var">odir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String -&gt; String
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcOptions -&gt; Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptObjDir"><span class="hs-identifier hs-var hs-var">ghcOptObjDir</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717935"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1224"></span><span>          </span><span class="annot"><span class="annottext">Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#createDirectoryIfMissingVerbose"><span class="hs-identifier hs-var">createDirectoryIfMissingVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717932"><span class="hs-identifier hs-var">odir</span></a></span><span>
</span><span id="line-1225"></span><span>          </span><span id="local-6989586621679717930"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717930"><span class="hs-identifier hs-var">needsRecomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; GhcOptions -&gt; IO Bool
</span><a href="Distribution.Simple.GHCJS.html#checkNeedsRecompilation"><span class="hs-identifier hs-var">checkNeedsRecompilation</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717943"><span class="hs-identifier hs-var">filename</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717935"><span class="hs-identifier hs-var">opts</span></a></span><span>
</span><span id="line-1226"></span><span>          </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717930"><span class="hs-identifier hs-var">needsRecomp</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1227"></span><span>            </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718029"><span class="hs-identifier hs-var">runGhcProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717935"><span class="hs-identifier hs-var">opts</span></a></span><span>
</span><span id="line-1228"></span><span>     </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679717943"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717943"><span class="hs-identifier hs-var">filename</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718008"><span class="hs-identifier hs-var">cxxSrcs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1229"></span><span>
</span><span id="line-1230"></span><span>  </span><span class="hs-comment">-- build any C sources</span><span>
</span><span id="line-1231"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718009"><span class="hs-identifier hs-var">cSrcs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1232"></span><span>   </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Building C Sources...&quot;</span></span><span>
</span><span id="line-1233"></span><span>   </span><span class="annot"><span class="annottext">[IO ()] -&gt; IO ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Foldable t, Monad m) =&gt;
t (m a) -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#sequence_"><span class="hs-identifier hs-var">sequence_</span></a></span><span>
</span><span id="line-1234"></span><span>     </span><span class="hs-special">[</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717928"><span class="annot"><span class="annottext">baseCcOpts :: GhcOptions
</span><a href="#local-6989586621679717928"><span class="hs-identifier hs-var hs-var">baseCcOpts</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; GhcImplInfo
-&gt; LocalBuildInfo
-&gt; BuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; String
-&gt; GhcOptions
</span><a href="Distribution.Simple.GHC.Internal.html#componentCcGhcOptions"><span class="hs-identifier hs-var">Internal.componentCcGhcOptions</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679718030"><span class="hs-identifier hs-var">implInfo</span></a></span><span>
</span><span id="line-1235"></span><span>                              </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679718028"><span class="hs-identifier hs-var">bnfo</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679718039"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718022"><span class="hs-identifier hs-var">tmpDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717926"><span class="hs-identifier hs-var">filename</span></a></span><span>
</span><span id="line-1236"></span><span>              </span><span id="local-6989586621679717925"><span class="annot"><span class="annottext">vanillaCcOpts :: GhcOptions
</span><a href="#local-6989586621679717925"><span class="hs-identifier hs-var hs-var">vanillaCcOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718005"><span class="hs-identifier hs-var">isGhcDynamic</span></a></span><span>
</span><span id="line-1237"></span><span>                              </span><span class="hs-comment">-- Dynamic GHC requires C sources to be built</span><span>
</span><span id="line-1238"></span><span>                              </span><span class="hs-comment">-- with -fPIC for REPL to work. See #2207.</span><span>
</span><span id="line-1239"></span><span>                              </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717928"><span class="hs-identifier hs-var">baseCcOpts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ghcOptFPic :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptFPic"><span class="hs-identifier hs-var">ghcOptFPic</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1240"></span><span>                              </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717928"><span class="hs-identifier hs-var">baseCcOpts</span></a></span><span>
</span><span id="line-1241"></span><span>              </span><span id="local-6989586621679717922"><span class="annot"><span class="annottext">profCcOpts :: GhcOptions
</span><a href="#local-6989586621679717922"><span class="hs-identifier hs-var hs-var">profCcOpts</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717925"><span class="hs-identifier hs-var">vanillaCcOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1242"></span><span>                                </span><span class="annot"><span class="annottext">ghcOptProfilingMode :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptProfilingMode"><span class="hs-identifier hs-var">ghcOptProfilingMode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1243"></span><span>                              </span><span class="hs-special">}</span><span>
</span><span id="line-1244"></span><span>              </span><span id="local-6989586621679717919"><span class="annot"><span class="annottext">sharedCcOpts :: GhcOptions
</span><a href="#local-6989586621679717919"><span class="hs-identifier hs-var hs-var">sharedCcOpts</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717925"><span class="hs-identifier hs-var">vanillaCcOpts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1245"></span><span>                                </span><span class="annot"><span class="annottext">ghcOptFPic :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptFPic"><span class="hs-identifier hs-var">ghcOptFPic</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-1246"></span><span>                                </span><span class="annot"><span class="annottext">ghcOptDynLinkMode :: Flag GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynLinkMode"><span class="hs-identifier hs-var">ghcOptDynLinkMode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode -&gt; Flag GhcDynLinkMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcDynamicOnly"><span class="hs-identifier hs-var">GhcDynamicOnly</span></a></span><span>
</span><span id="line-1247"></span><span>                              </span><span class="hs-special">}</span><span>
</span><span id="line-1248"></span><span>              </span><span id="local-6989586621679717918"><span class="annot"><span class="annottext">opts :: GhcOptions
</span><a href="#local-6989586621679717918"><span class="hs-identifier hs-var hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718000"><span class="hs-identifier hs-var">needProfiling</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717922"><span class="hs-identifier hs-var">profCcOpts</span></a></span><span>
</span><span id="line-1249"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718001"><span class="hs-identifier hs-var">needDynamic</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717919"><span class="hs-identifier hs-var">sharedCcOpts</span></a></span><span>
</span><span id="line-1250"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717925"><span class="hs-identifier hs-var">vanillaCcOpts</span></a></span><span>
</span><span id="line-1251"></span><span>              </span><span id="local-6989586621679717915"><span class="annot"><span class="annottext">odir :: String
</span><a href="#local-6989586621679717915"><span class="hs-identifier hs-var hs-var">odir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String -&gt; String
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcOptions -&gt; Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptObjDir"><span class="hs-identifier hs-var hs-var">ghcOptObjDir</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717918"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1252"></span><span>          </span><span class="annot"><span class="annottext">Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#createDirectoryIfMissingVerbose"><span class="hs-identifier hs-var">createDirectoryIfMissingVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717915"><span class="hs-identifier hs-var">odir</span></a></span><span>
</span><span id="line-1253"></span><span>          </span><span id="local-6989586621679717914"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717914"><span class="hs-identifier hs-var">needsRecomp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; GhcOptions -&gt; IO Bool
</span><a href="Distribution.Simple.GHCJS.html#checkNeedsRecompilation"><span class="hs-identifier hs-var">checkNeedsRecompilation</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717926"><span class="hs-identifier hs-var">filename</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717918"><span class="hs-identifier hs-var">opts</span></a></span><span>
</span><span id="line-1254"></span><span>          </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717914"><span class="hs-identifier hs-var">needsRecomp</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1255"></span><span>            </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718029"><span class="hs-identifier hs-var">runGhcProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717918"><span class="hs-identifier hs-var">opts</span></a></span><span>
</span><span id="line-1256"></span><span>     </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679717926"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717926"><span class="hs-identifier hs-var">filename</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718009"><span class="hs-identifier hs-var">cSrcs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1257"></span><span>
</span><span id="line-1258"></span><span>  </span><span class="hs-comment">-- TODO: problem here is we need the .c files built first, so we can load them</span><span>
</span><span id="line-1259"></span><span>  </span><span class="hs-comment">-- with ghci, but .c files can depend on .h files generated by ghc by ffi</span><span>
</span><span id="line-1260"></span><span>  </span><span class="hs-comment">-- exports.</span><span>
</span><span id="line-1261"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1262"></span><span>    </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplExe"><span class="hs-identifier hs-type">GReplExe</span></a></span><span>  </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718029"><span class="hs-identifier hs-var">runGhcProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717959"><span class="hs-identifier hs-var">replOpts</span></a></span><span>
</span><span id="line-1263"></span><span>    </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GReplFLib"><span class="hs-identifier hs-type">GReplFLib</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718029"><span class="hs-identifier hs-var">runGhcProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717959"><span class="hs-identifier hs-var">replOpts</span></a></span><span>
</span><span id="line-1264"></span><span>    </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildExe"><span class="hs-identifier hs-type">GBuildExe</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1265"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717907"><span class="annot"><span class="annottext">linkOpts :: GhcOptions
</span><a href="#local-6989586621679717907"><span class="hs-identifier hs-var hs-var">linkOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717955"><span class="hs-identifier hs-var">commonOpts</span></a></span><span>
</span><span id="line-1266"></span><span>                   </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717970"><span class="hs-identifier hs-var">linkerOpts</span></a></span><span>
</span><span id="line-1267"></span><span>                   </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1268"></span><span>                      </span><span class="annot"><span class="annottext">ghcOptLinkNoHsMain :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkNoHsMain"><span class="hs-identifier hs-var">ghcOptLinkNoHsMain</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679718007"><span class="hs-identifier hs-var">inputFiles</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1269"></span><span>                     </span><span class="hs-special">}</span><span>
</span><span id="line-1270"></span><span>                   </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withDynExe"><span class="hs-identifier hs-var hs-var">withDynExe</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717965"><span class="hs-identifier hs-var">dynLinkerOpts</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1271"></span><span>
</span><span id="line-1272"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Linking...&quot;</span></span><span>
</span><span id="line-1273"></span><span>      </span><span class="hs-comment">-- Work around old GHCs not relinking in this</span><span>
</span><span id="line-1274"></span><span>      </span><span class="hs-comment">-- situation, see #3294</span><span>
</span><span id="line-1275"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717905"><span class="annot"><span class="annottext">target :: String
</span><a href="#local-6989586621679717905"><span class="hs-identifier hs-var hs-var">target</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718024"><span class="hs-identifier hs-var">targetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718025"><span class="hs-identifier hs-var">targetName</span></a></span><span>
</span><span id="line-1276"></span><span>      </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Version
</span><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier hs-var">compilerVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679718032"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1277"></span><span>        </span><span id="local-6989586621679717903"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717903"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717905"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-1278"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717903"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#removeFile"><span class="hs-identifier hs-var">removeFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717905"><span class="hs-identifier hs-var">target</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1279"></span><span>      </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718029"><span class="hs-identifier hs-var">runGhcProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717907"><span class="hs-identifier hs-var">linkOpts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ghcOptOutputFile :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptOutputFile"><span class="hs-identifier hs-var">ghcOptOutputFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717905"><span class="hs-identifier hs-var">target</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1280"></span><span>    </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#GBuildFLib"><span class="hs-identifier hs-type">GBuildFLib</span></a></span><span> </span><span id="local-6989586621679717902"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679717902"><span class="hs-identifier hs-var">flib</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1281"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717901"><span class="annot"><span class="annottext">rtsInfo :: RtsInfo
</span><a href="#local-6989586621679717901"><span class="hs-identifier hs-var hs-var">rtsInfo</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; RtsInfo
</span><a href="Distribution.Simple.GHCJS.html#extractRtsInfo"><span class="hs-identifier hs-var">extractRtsInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1282"></span><span>          </span><span id="local-6989586621679717899"><span class="annot"><span class="annottext">rtsOptLinkLibs :: [String]
</span><a href="#local-6989586621679717899"><span class="hs-identifier hs-var hs-var">rtsOptLinkLibs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span>
</span><span id="line-1283"></span><span>              </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718001"><span class="hs-identifier hs-var">needDynamic</span></a></span><span>
</span><span id="line-1284"></span><span>                  </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718027"><span class="hs-identifier hs-var">threaded</span></a></span><span>
</span><span id="line-1285"></span><span>                            </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">DynamicRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsThreadedLib"><span class="hs-identifier hs-var hs-var">dynRtsThreadedLib</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RtsInfo -&gt; DynamicRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#rtsDynamicInfo"><span class="hs-identifier hs-var hs-var">rtsDynamicInfo</span></a></span><span> </span><span class="annot"><span class="annottext">RtsInfo
</span><a href="#local-6989586621679717901"><span class="hs-identifier hs-var">rtsInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1286"></span><span>                            </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">DynamicRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsVanillaLib"><span class="hs-identifier hs-var hs-var">dynRtsVanillaLib</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RtsInfo -&gt; DynamicRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#rtsDynamicInfo"><span class="hs-identifier hs-var hs-var">rtsDynamicInfo</span></a></span><span> </span><span class="annot"><span class="annottext">RtsInfo
</span><a href="#local-6989586621679717901"><span class="hs-identifier hs-var">rtsInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1287"></span><span>                  </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679718027"><span class="hs-identifier hs-var">threaded</span></a></span><span>
</span><span id="line-1288"></span><span>                           </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsThreadedLib"><span class="hs-identifier hs-var hs-var">statRtsThreadedLib</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RtsInfo -&gt; StaticRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#rtsStaticInfo"><span class="hs-identifier hs-var hs-var">rtsStaticInfo</span></a></span><span> </span><span class="annot"><span class="annottext">RtsInfo
</span><a href="#local-6989586621679717901"><span class="hs-identifier hs-var">rtsInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1289"></span><span>                           </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsVanillaLib"><span class="hs-identifier hs-var hs-var">statRtsVanillaLib</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RtsInfo -&gt; StaticRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#rtsStaticInfo"><span class="hs-identifier hs-var hs-var">rtsStaticInfo</span></a></span><span> </span><span class="annot"><span class="annottext">RtsInfo
</span><a href="#local-6989586621679717901"><span class="hs-identifier hs-var">rtsInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1290"></span><span>              </span><span class="hs-special">]</span><span>
</span><span id="line-1291"></span><span>          </span><span id="local-6989586621679717882"><span class="annot"><span class="annottext">linkOpts :: GhcOptions
</span><a href="#local-6989586621679717882"><span class="hs-identifier hs-var hs-var">linkOpts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; ForeignLibType
</span><a href="Distribution.Types.ForeignLib.html#foreignLibType"><span class="hs-identifier hs-var hs-var">foreignLibType</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679717902"><span class="hs-identifier hs-var">flib</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1292"></span><span>            </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeShared"><span class="hs-identifier hs-var">ForeignLibNativeShared</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1293"></span><span>                        </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717955"><span class="hs-identifier hs-var">commonOpts</span></a></span><span>
</span><span id="line-1294"></span><span>              </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717970"><span class="hs-identifier hs-var">linkerOpts</span></a></span><span>
</span><span id="line-1295"></span><span>              </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717965"><span class="hs-identifier hs-var">dynLinkerOpts</span></a></span><span>
</span><span id="line-1296"></span><span>              </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1297"></span><span>                 </span><span class="annot"><span class="annottext">ghcOptLinkNoHsMain :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkNoHsMain"><span class="hs-identifier hs-var">ghcOptLinkNoHsMain</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-1298"></span><span>                 </span><span class="annot"><span class="annottext">ghcOptShared :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptShared"><span class="hs-identifier hs-var">ghcOptShared</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-1299"></span><span>                 </span><span class="annot"><span class="annottext">ghcOptLinkLibs :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkLibs"><span class="hs-identifier hs-var">ghcOptLinkLibs</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679717899"><span class="hs-identifier hs-var">rtsOptLinkLibs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1300"></span><span>                 </span><span class="annot"><span class="annottext">ghcOptLinkLibPath :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkLibPath"><span class="hs-identifier hs-var">ghcOptLinkLibPath</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; NubListR String) -&gt; [String] -&gt; NubListR String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RtsInfo -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#rtsLibPaths"><span class="hs-identifier hs-var hs-var">rtsLibPaths</span></a></span><span> </span><span class="annot"><span class="annottext">RtsInfo
</span><a href="#local-6989586621679717901"><span class="hs-identifier hs-var">rtsInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1301"></span><span>                 </span><span class="annot"><span class="annottext">ghcOptFPic :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptFPic"><span class="hs-identifier hs-var">ghcOptFPic</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-1302"></span><span>                 </span><span class="annot"><span class="annottext">ghcOptLinkModDefFiles :: NubListR String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkModDefFiles"><span class="hs-identifier hs-var">ghcOptLinkModDefFiles</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; NubListR String) -&gt; [String] -&gt; NubListR String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#gbuildModDefFiles"><span class="hs-identifier hs-var">gbuildModDefFiles</span></a></span><span> </span><span class="annot"><span class="annottext">GBuildMode
</span><a href="#local-6989586621679718040"><span class="hs-identifier hs-var">bm</span></a></span><span>
</span><span id="line-1303"></span><span>                </span><span class="hs-special">}</span><span>
</span><span id="line-1304"></span><span>              </span><span class="hs-comment">-- See Note [RPATH]</span><span>
</span><span id="line-1305"></span><span>              </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; LocalBuildInfo -&gt; a -&gt; a
</span><a href="Distribution.Simple.GHCJS.html#ifNeedsRPathWorkaround"><span class="hs-identifier hs-var">ifNeedsRPathWorkaround</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1306"></span><span>                  </span><span class="annot"><span class="annottext">ghcOptLinkOptions :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkOptions"><span class="hs-identifier hs-var">ghcOptLinkOptions</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-Wl,--no-as-needed&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-1307"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ghcOptLinkLibs :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptLinkLibs"><span class="hs-identifier hs-var">ghcOptLinkLibs</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ffi&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-1308"></span><span>                </span><span class="hs-special">}</span><span>
</span><span id="line-1309"></span><span>            </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibNativeStatic"><span class="hs-identifier hs-var">ForeignLibNativeStatic</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1310"></span><span>              </span><span class="hs-comment">-- this should be caught by buildFLib</span><span>
</span><span id="line-1311"></span><span>              </span><span class="hs-comment">-- (and if we do implement this, we probably don't even want to call</span><span>
</span><span id="line-1312"></span><span>              </span><span class="hs-comment">-- ghc here, but rather Ar.createArLibArchive or something)</span><span>
</span><span id="line-1313"></span><span>              </span><span class="annot"><span class="annottext">String -&gt; GhcOptions
forall a. String -&gt; a
</span><a href="Distribution.PackageDescription.Utils.html#cabalBug"><span class="hs-identifier hs-var">cabalBug</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;static libraries not yet implemented&quot;</span></span><span>
</span><span id="line-1314"></span><span>            </span><span class="annot"><span class="annottext">ForeignLibType
</span><a href="Distribution.Types.ForeignLibType.html#ForeignLibTypeUnknown"><span class="hs-identifier hs-var">ForeignLibTypeUnknown</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1315"></span><span>              </span><span class="annot"><span class="annottext">String -&gt; GhcOptions
forall a. String -&gt; a
</span><a href="Distribution.PackageDescription.Utils.html#cabalBug"><span class="hs-identifier hs-var">cabalBug</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unknown foreign lib type&quot;</span></span><span>
</span><span id="line-1316"></span><span>      </span><span class="hs-comment">-- We build under a (potentially) different filename to set a</span><span>
</span><span id="line-1317"></span><span>      </span><span class="hs-comment">-- soname on supported platforms.  See also the note for</span><span>
</span><span id="line-1318"></span><span>      </span><span class="hs-comment">-- @flibBuildName@.</span><span>
</span><span id="line-1319"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#info"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679718044"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Linking...&quot;</span></span><span>
</span><span id="line-1320"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717878"><span class="annot"><span class="annottext">buildName :: String
</span><a href="#local-6989586621679717878"><span class="hs-identifier hs-var hs-var">buildName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ForeignLib -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#flibBuildName"><span class="hs-identifier hs-var">flibBuildName</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679718041"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679717902"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-1321"></span><span>      </span><span class="annot"><span class="annottext">GhcOptions -&gt; IO ()
</span><a href="#local-6989586621679718029"><span class="hs-identifier hs-var">runGhcProg</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717882"><span class="hs-identifier hs-var">linkOpts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ghcOptOutputFile :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptOutputFile"><span class="hs-identifier hs-var">ghcOptOutputFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718024"><span class="hs-identifier hs-var">targetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717878"><span class="hs-identifier hs-var">buildName</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1322"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#renameFile"><span class="hs-identifier hs-var">renameFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718024"><span class="hs-identifier hs-var">targetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717878"><span class="hs-identifier hs-var">buildName</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718024"><span class="hs-identifier hs-var">targetDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679718025"><span class="hs-identifier hs-var">targetName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1323"></span><span>
</span><span id="line-1324"></span><span class="hs-comment">{-
Note [RPATH]
~~~~~~~~~~~~

Suppose that the dynamic library depends on `base`, but not (directly) on
`integer-gmp` (which, however, is a dependency of `base`). We will link the
library as

    gcc ... -lHSbase-4.7.0.2-ghc7.8.4 -lHSinteger-gmp-0.5.1.0-ghc7.8.4 ...

However, on systems (like Ubuntu) where the linker gets called with `-as-needed`
by default, the linker will notice that `integer-gmp` isn't actually a direct
dependency and hence omit the link.

Then when we attempt to link a C program against this dynamic library, the
_static_ linker will attempt to verify that all symbols can be resolved.  The
dynamic library itself does not require any symbols from `integer-gmp`, but
`base` does. In order to verify that the symbols used by `base` can be
resolved, the static linker needs to be able to _find_ integer-gmp.

Finding the `base` dependency is simple, because the dynamic elf header
(`readelf -d`) for the library that we have created looks something like

    (NEEDED) Shared library: [libHSbase-4.7.0.2-ghc7.8.4.so]
    (RPATH)  Library rpath: [/path/to/base-4.7.0.2:...]

However, when it comes to resolving the dependency on `integer-gmp`, it needs
to look at the dynamic header for `base`. On modern ghc (7.8 and higher) this
looks something like

    (NEEDED) Shared library: [libHSinteger-gmp-0.5.1.0-ghc7.8.4.so]
    (RPATH)  Library rpath: [$ORIGIN/../integer-gmp-0.5.1.0:...]

This specifies the location of `integer-gmp` _in terms of_ the location of base
(using the `$ORIGIN`) variable. But here's the crux: when the static linker
attempts to verify that all symbols can be resolved, [**IT DOES NOT RESOLVE
`$ORIGIN`**](http://stackoverflow.com/questions/6323603/ld-using-rpath-origin-inside-a-shared-library-recursive).
As a consequence, it will not be able to resolve the symbols and report the
missing symbols as errors, _even though the dynamic linker **would** be able to
resolve these symbols_. We can tell the static linker not to report these
errors by using `--unresolved-symbols=ignore-all` and all will be fine when we
run the program ([(indeed, this is what the gold linker
does)](https://sourceware.org/ml/binutils/2013-05/msg00038.html), but it makes
the resulting library more difficult to use.

Instead what we can do is make sure that the generated dynamic library has
explicit top-level dependencies on these libraries. This means that the static
linker knows where to find them, and when we have transitive dependencies on
the same libraries the linker will only load them once, so we avoid needing to
look at the `RPATH` of our dependencies. We can do this by passing
`--no-as-needed` to the linker, so that it doesn't omit any libraries.

Note that on older ghc (7.6 and before) the Haskell libraries don't have an
RPATH set at all, which makes it even more important that we make these
top-level dependencies.

Finally, we have to explicitly link against `libffi` for the same reason. For
newer ghc this _happens_ to be unnecessary on many systems because `libffi` is
a library which is not specific to GHC, and when the static linker verifies
that all symbols can be resolved it will find the `libffi` that is globally
installed (completely independent from ghc). Of course, this may well be the
_wrong_ version of `libffi`, but it's quite possible that symbol resolution
happens to work. This is of course the wrong approach, which is why we link
explicitly against `libffi` so that we will find the _right_ version of
`libffi`.
-}</span><span>
</span><span id="line-1390"></span><span>
</span><span id="line-1391"></span><span class="hs-comment">-- | Do we need the RPATH workaround?</span><span>
</span><span id="line-1392"></span><span class="hs-comment">--</span><span>
</span><span id="line-1393"></span><span class="hs-comment">-- See Note [RPATH].</span><span>
</span><span id="line-1394"></span><span id="local-6989586621679718957"><span class="annot"><a href="Distribution.Simple.GHCJS.html#ifNeedsRPathWorkaround"><span class="hs-identifier hs-type">ifNeedsRPathWorkaround</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679718957"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679718957"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679718957"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-1395"></span><span id="ifNeedsRPathWorkaround"><span class="annot"><span class="annottext">ifNeedsRPathWorkaround :: forall a. Monoid a =&gt; LocalBuildInfo -&gt; a -&gt; a
</span><a href="Distribution.Simple.GHCJS.html#ifNeedsRPathWorkaround"><span class="hs-identifier hs-var hs-var">ifNeedsRPathWorkaround</span></a></span></span><span> </span><span id="local-6989586621679717875"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717875"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679717874"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679717874"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1396"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717875"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1397"></span><span>    </span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Linux"><span class="hs-identifier hs-var">Linux</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679717874"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-1398"></span><span>    </span><span id="local-6989586621679717873"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679717873"><span class="hs-identifier hs-var">_otherwise</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-1399"></span><span>
</span><span id="line-1400"></span><span class="hs-keyword">data</span><span> </span><span id="DynamicRtsInfo"><span class="annot"><a href="Distribution.Simple.GHCJS.html#DynamicRtsInfo"><span class="hs-identifier hs-var">DynamicRtsInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="DynamicRtsInfo"><span class="annot"><a href="Distribution.Simple.GHCJS.html#DynamicRtsInfo"><span class="hs-identifier hs-var">DynamicRtsInfo</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1401"></span><span>    </span><span id="dynRtsVanillaLib"><span class="annot"><span class="annottext">DynamicRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsVanillaLib"><span class="hs-identifier hs-var hs-var">dynRtsVanillaLib</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1402"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dynRtsThreadedLib"><span class="annot"><span class="annottext">DynamicRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsThreadedLib"><span class="hs-identifier hs-var hs-var">dynRtsThreadedLib</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1403"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dynRtsDebugLib"><span class="annot"><span class="annottext">DynamicRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsDebugLib"><span class="hs-identifier hs-var hs-var">dynRtsDebugLib</span></a></span></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1404"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dynRtsEventlogLib"><span class="annot"><span class="annottext">DynamicRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsEventlogLib"><span class="hs-identifier hs-var hs-var">dynRtsEventlogLib</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1405"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dynRtsThreadedDebugLib"><span class="annot"><span class="annottext">DynamicRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsThreadedDebugLib"><span class="hs-identifier hs-var hs-var">dynRtsThreadedDebugLib</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1406"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dynRtsThreadedEventlogLib"><span class="annot"><span class="annottext">DynamicRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsThreadedEventlogLib"><span class="hs-identifier hs-var hs-var">dynRtsThreadedEventlogLib</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1407"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-1408"></span><span>
</span><span id="line-1409"></span><span class="hs-keyword">data</span><span> </span><span id="StaticRtsInfo"><span class="annot"><a href="Distribution.Simple.GHCJS.html#StaticRtsInfo"><span class="hs-identifier hs-var">StaticRtsInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="StaticRtsInfo"><span class="annot"><a href="Distribution.Simple.GHCJS.html#StaticRtsInfo"><span class="hs-identifier hs-var">StaticRtsInfo</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1410"></span><span>    </span><span id="statRtsVanillaLib"><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsVanillaLib"><span class="hs-identifier hs-var hs-var">statRtsVanillaLib</span></a></span></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1411"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="statRtsThreadedLib"><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsThreadedLib"><span class="hs-identifier hs-var hs-var">statRtsThreadedLib</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1412"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="statRtsDebugLib"><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsDebugLib"><span class="hs-identifier hs-var hs-var">statRtsDebugLib</span></a></span></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1413"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="statRtsEventlogLib"><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsEventlogLib"><span class="hs-identifier hs-var hs-var">statRtsEventlogLib</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1414"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="statRtsThreadedDebugLib"><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsThreadedDebugLib"><span class="hs-identifier hs-var hs-var">statRtsThreadedDebugLib</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1415"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="statRtsThreadedEventlogLib"><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsThreadedEventlogLib"><span class="hs-identifier hs-var hs-var">statRtsThreadedEventlogLib</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1416"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="statRtsProfilingLib"><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsProfilingLib"><span class="hs-identifier hs-var hs-var">statRtsProfilingLib</span></a></span></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1417"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="statRtsThreadedProfilingLib"><span class="annot"><span class="annottext">StaticRtsInfo -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#statRtsThreadedProfilingLib"><span class="hs-identifier hs-var hs-var">statRtsThreadedProfilingLib</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1418"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-1419"></span><span>
</span><span id="line-1420"></span><span class="hs-keyword">data</span><span> </span><span id="RtsInfo"><span class="annot"><a href="Distribution.Simple.GHCJS.html#RtsInfo"><span class="hs-identifier hs-var">RtsInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="RtsInfo"><span class="annot"><a href="Distribution.Simple.GHCJS.html#RtsInfo"><span class="hs-identifier hs-var">RtsInfo</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1421"></span><span>    </span><span id="rtsDynamicInfo"><span class="annot"><span class="annottext">RtsInfo -&gt; DynamicRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#rtsDynamicInfo"><span class="hs-identifier hs-var hs-var">rtsDynamicInfo</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#DynamicRtsInfo"><span class="hs-identifier hs-type">DynamicRtsInfo</span></a></span><span>
</span><span id="line-1422"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="rtsStaticInfo"><span class="annot"><span class="annottext">RtsInfo -&gt; StaticRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#rtsStaticInfo"><span class="hs-identifier hs-var hs-var">rtsStaticInfo</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#StaticRtsInfo"><span class="hs-identifier hs-type">StaticRtsInfo</span></a></span><span>
</span><span id="line-1423"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="rtsLibPaths"><span class="annot"><span class="annottext">RtsInfo -&gt; [String]
</span><a href="Distribution.Simple.GHCJS.html#rtsLibPaths"><span class="hs-identifier hs-var hs-var">rtsLibPaths</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1424"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-1425"></span><span>
</span><span id="line-1426"></span><span class="hs-comment">-- | Extract (and compute) information about the RTS library</span><span>
</span><span id="line-1427"></span><span class="hs-comment">--</span><span>
</span><span id="line-1428"></span><span class="hs-comment">-- TODO: This hardcodes the name as @HSrts-ghc&lt;version&gt;@. I don't know if we can</span><span>
</span><span id="line-1429"></span><span class="hs-comment">-- find this information somewhere. We can lookup the 'hsLibraries' field of</span><span>
</span><span id="line-1430"></span><span class="hs-comment">-- 'InstalledPackageInfo' but it will tell us @[&quot;HSrts&quot;, &quot;Cffi&quot;]@, which</span><span>
</span><span id="line-1431"></span><span class="hs-comment">-- doesn't really help.</span><span>
</span><span id="line-1432"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#extractRtsInfo"><span class="hs-identifier hs-type">extractRtsInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#RtsInfo"><span class="hs-identifier hs-type">RtsInfo</span></a></span><span>
</span><span id="line-1433"></span><span id="extractRtsInfo"><span class="annot"><span class="annottext">extractRtsInfo :: LocalBuildInfo -&gt; RtsInfo
</span><a href="Distribution.Simple.GHCJS.html#extractRtsInfo"><span class="hs-identifier hs-var hs-var">extractRtsInfo</span></a></span></span><span> </span><span id="local-6989586621679717859"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717859"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1434"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstalledPackageIndex
-&gt; PackageName -&gt; [(Version, [InstalledPackageInfo])]
forall a. PackageIndex a -&gt; PackageName -&gt; [(Version, [a])]
</span><a href="Distribution.Simple.PackageIndex.html#lookupPackageName"><span class="hs-identifier hs-var">PackageIndex.lookupPackageName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; InstalledPackageIndex
</span><a href="Distribution.Types.LocalBuildInfo.html#installedPkgs"><span class="hs-identifier hs-var hs-var">installedPkgs</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717859"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PackageName
</span><a href="Distribution.Types.PackageName.html#mkPackageName"><span class="hs-identifier hs-var">mkPackageName</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rts&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1435"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span id="local-6989586621679717855"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679717855"><span class="hs-identifier hs-var">rts</span></a></span></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; RtsInfo
</span><a href="#local-6989586621679717854"><span class="hs-identifier hs-var">aux</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679717855"><span class="hs-identifier hs-var">rts</span></a></span><span>
</span><span id="line-1436"></span><span>      </span><span id="local-6989586621679717853"><span class="annot"><span class="annottext">[(Version, [InstalledPackageInfo])]
</span><a href="#local-6989586621679717853"><span class="hs-identifier hs-var">_otherwise</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; RtsInfo
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;No (or multiple) ghc rts package is registered&quot;</span></span><span>
</span><span id="line-1437"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1438"></span><span>    </span><span class="annot"><a href="#local-6989586621679717854"><span class="hs-identifier hs-type">aux</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.GHCJS.html#RtsInfo"><span class="hs-identifier hs-type">RtsInfo</span></a></span><span>
</span><span id="line-1439"></span><span>    </span><span id="local-6989586621679717854"><span class="annot"><span class="annottext">aux :: InstalledPackageInfo -&gt; RtsInfo
</span><a href="#local-6989586621679717854"><span class="hs-identifier hs-var hs-var">aux</span></a></span></span><span> </span><span id="local-6989586621679717852"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679717852"><span class="hs-identifier hs-var">rts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RtsInfo :: DynamicRtsInfo -&gt; StaticRtsInfo -&gt; [String] -&gt; RtsInfo
</span><a href="Distribution.Simple.GHCJS.html#RtsInfo"><span class="hs-identifier hs-type">RtsInfo</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1440"></span><span>        </span><span class="annot"><span class="annottext">rtsDynamicInfo :: DynamicRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#rtsDynamicInfo"><span class="hs-identifier hs-var">rtsDynamicInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynamicRtsInfo :: String
-&gt; String -&gt; String -&gt; String -&gt; String -&gt; String -&gt; DynamicRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#DynamicRtsInfo"><span class="hs-identifier hs-type">DynamicRtsInfo</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1441"></span><span>            </span><span class="annot"><span class="annottext">dynRtsVanillaLib :: String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsVanillaLib"><span class="hs-identifier hs-var">dynRtsVanillaLib</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679717851"><span class="hs-identifier hs-var">withGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts&quot;</span></span><span>
</span><span id="line-1442"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dynRtsThreadedLib :: String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsThreadedLib"><span class="hs-identifier hs-var">dynRtsThreadedLib</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679717851"><span class="hs-identifier hs-var">withGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_thr&quot;</span></span><span>
</span><span id="line-1443"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dynRtsDebugLib :: String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsDebugLib"><span class="hs-identifier hs-var">dynRtsDebugLib</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679717851"><span class="hs-identifier hs-var">withGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_debug&quot;</span></span><span>
</span><span id="line-1444"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dynRtsEventlogLib :: String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsEventlogLib"><span class="hs-identifier hs-var">dynRtsEventlogLib</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679717851"><span class="hs-identifier hs-var">withGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_l&quot;</span></span><span>
</span><span id="line-1445"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dynRtsThreadedDebugLib :: String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsThreadedDebugLib"><span class="hs-identifier hs-var">dynRtsThreadedDebugLib</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679717851"><span class="hs-identifier hs-var">withGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_thr_debug&quot;</span></span><span>
</span><span id="line-1446"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dynRtsThreadedEventlogLib :: String
</span><a href="Distribution.Simple.GHCJS.html#dynRtsThreadedEventlogLib"><span class="hs-identifier hs-var">dynRtsThreadedEventlogLib</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679717851"><span class="hs-identifier hs-var">withGhcVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_thr_l&quot;</span></span><span>
</span><span id="line-1447"></span><span>          </span><span class="hs-special">}</span><span>
</span><span id="line-1448"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtsStaticInfo :: StaticRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#rtsStaticInfo"><span class="hs-identifier hs-var">rtsStaticInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StaticRtsInfo :: String
-&gt; String
-&gt; String
-&gt; String
-&gt; String
-&gt; String
-&gt; String
-&gt; String
-&gt; StaticRtsInfo
</span><a href="Distribution.Simple.GHCJS.html#StaticRtsInfo"><span class="hs-identifier hs-type">StaticRtsInfo</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1449"></span><span>            </span><span class="annot"><span class="annottext">statRtsVanillaLib :: String
</span><a href="Distribution.Simple.GHCJS.html#statRtsVanillaLib"><span class="hs-identifier hs-var">statRtsVanillaLib</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts&quot;</span></span><span>
</span><span id="line-1450"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">statRtsThreadedLib :: String
</span><a href="Distribution.Simple.GHCJS.html#statRtsThreadedLib"><span class="hs-identifier hs-var">statRtsThreadedLib</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_thr&quot;</span></span><span>
</span><span id="line-1451"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">statRtsDebugLib :: String
</span><a href="Distribution.Simple.GHCJS.html#statRtsDebugLib"><span class="hs-identifier hs-var">statRtsDebugLib</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_debug&quot;</span></span><span>
</span><span id="line-1452"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">statRtsEventlogLib :: String
</span><a href="Distribution.Simple.GHCJS.html#statRtsEventlogLib"><span class="hs-identifier hs-var">statRtsEventlogLib</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_l&quot;</span></span><span>
</span><span id="line-1453"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">statRtsThreadedDebugLib :: String
</span><a href="Distribution.Simple.GHCJS.html#statRtsThreadedDebugLib"><span class="hs-identifier hs-var">statRtsThreadedDebugLib</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_thr_debug&quot;</span></span><span>
</span><span id="line-1454"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">statRtsThreadedEventlogLib :: String
</span><a href="Distribution.Simple.GHCJS.html#statRtsThreadedEventlogLib"><span class="hs-identifier hs-var">statRtsThreadedEventlogLib</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_thr_l&quot;</span></span><span>
</span><span id="line-1455"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">statRtsProfilingLib :: String
</span><a href="Distribution.Simple.GHCJS.html#statRtsProfilingLib"><span class="hs-identifier hs-var">statRtsProfilingLib</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_p&quot;</span></span><span>
</span><span id="line-1456"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">statRtsThreadedProfilingLib :: String
</span><a href="Distribution.Simple.GHCJS.html#statRtsThreadedProfilingLib"><span class="hs-identifier hs-var">statRtsThreadedProfilingLib</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HSrts_thr_p&quot;</span></span><span>
</span><span id="line-1457"></span><span>          </span><span class="hs-special">}</span><span>
</span><span id="line-1458"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtsLibPaths :: [String]
</span><a href="Distribution.Simple.GHCJS.html#rtsLibPaths"><span class="hs-identifier hs-var">rtsLibPaths</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo -&gt; [String]
</span><a href="Distribution.Types.InstalledPackageInfo.html#libraryDirs"><span class="hs-identifier hs-var hs-var">InstalledPackageInfo.libraryDirs</span></a></span><span> </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679717852"><span class="hs-identifier hs-var">rts</span></a></span><span>
</span><span id="line-1459"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-1460"></span><span>    </span><span id="local-6989586621679717851"><span class="annot"><span class="annottext">withGhcVersion :: String -&gt; String
</span><a href="#local-6989586621679717851"><span class="hs-identifier hs-var hs-var">withGhcVersion</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-ghc&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Version
</span><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier hs-var">compilerVersion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717859"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1461"></span><span>
</span><span id="line-1462"></span><span class="hs-comment">-- | Returns True if the modification date of the given source file is newer than</span><span>
</span><span id="line-1463"></span><span class="hs-comment">-- the object file we last compiled for it, or if no object file exists yet.</span><span>
</span><span id="line-1464"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#checkNeedsRecompilation"><span class="hs-identifier hs-type">checkNeedsRecompilation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.GHC.html#GhcOptions"><span class="hs-identifier hs-type">GhcOptions</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1465"></span><span id="checkNeedsRecompilation"><span class="annot"><span class="annottext">checkNeedsRecompilation :: String -&gt; GhcOptions -&gt; IO Bool
</span><a href="Distribution.Simple.GHCJS.html#checkNeedsRecompilation"><span class="hs-identifier hs-var hs-var">checkNeedsRecompilation</span></a></span></span><span> </span><span id="local-6989586621679717848"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717848"><span class="hs-identifier hs-var">filename</span></a></span></span><span> </span><span id="local-6989586621679717847"><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717847"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717848"><span class="hs-identifier hs-var">filename</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO Bool
</span><a href="Distribution.Simple.Utils.html#moreRecentFile"><span class="hs-operator hs-var">`moreRecentFile`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717845"><span class="hs-identifier hs-var">oname</span></a></span><span>
</span><span id="line-1466"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679717845"><span class="annot"><span class="annottext">oname :: String
</span><a href="#local-6989586621679717845"><span class="hs-identifier hs-var hs-var">oname</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; GhcOptions -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#getObjectFileName"><span class="hs-identifier hs-var">getObjectFileName</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717848"><span class="hs-identifier hs-var">filename</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717847"><span class="hs-identifier hs-var">opts</span></a></span><span>
</span><span id="line-1467"></span><span>
</span><span id="line-1468"></span><span class="hs-comment">-- | Finds the object file name of the given source file</span><span>
</span><span id="line-1469"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getObjectFileName"><span class="hs-identifier hs-type">getObjectFileName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.GHC.html#GhcOptions"><span class="hs-identifier hs-type">GhcOptions</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1470"></span><span id="getObjectFileName"><span class="annot"><span class="annottext">getObjectFileName :: String -&gt; GhcOptions -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#getObjectFileName"><span class="hs-identifier hs-var hs-var">getObjectFileName</span></a></span></span><span> </span><span id="local-6989586621679717843"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717843"><span class="hs-identifier hs-var">filename</span></a></span></span><span> </span><span id="local-6989586621679717842"><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717842"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717841"><span class="hs-identifier hs-var">oname</span></a></span><span>
</span><span id="line-1471"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679717838"><span class="annot"><span class="annottext">odir :: String
</span><a href="#local-6989586621679717838"><span class="hs-identifier hs-var hs-var">odir</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String -&gt; String
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcOptions -&gt; Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptObjDir"><span class="hs-identifier hs-var hs-var">ghcOptObjDir</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717842"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1472"></span><span>          </span><span id="local-6989586621679717837"><span class="annot"><span class="annottext">oext :: String
</span><a href="#local-6989586621679717837"><span class="hs-identifier hs-var hs-var">oext</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String -&gt; String
forall a. a -&gt; Flag a -&gt; a
</span><a href="Distribution.Simple.Flag.html#fromFlagOrDefault"><span class="hs-identifier hs-var">fromFlagOrDefault</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;o&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GhcOptions -&gt; Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptObjSuffix"><span class="hs-identifier hs-var hs-var">ghcOptObjSuffix</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717842"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1473"></span><span>          </span><span id="local-6989586621679717841"><span class="annot"><span class="annottext">oname :: String
</span><a href="#local-6989586621679717841"><span class="hs-identifier hs-var hs-var">oname</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717838"><span class="hs-identifier hs-var">odir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#replaceExtension"><span class="hs-identifier hs-var">replaceExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717843"><span class="hs-identifier hs-var">filename</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717837"><span class="hs-identifier hs-var">oext</span></a></span><span>
</span><span id="line-1474"></span><span>
</span><span id="line-1475"></span><span class="hs-comment">-- | Calculate the RPATHs for the component we are building.</span><span>
</span><span id="line-1476"></span><span class="hs-comment">--</span><span>
</span><span id="line-1477"></span><span class="hs-comment">-- Calculates relative RPATHs when 'relocatable' is set.</span><span>
</span><span id="line-1478"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getRPaths"><span class="hs-identifier hs-type">getRPaths</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-1479"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-comment">-- ^ Component we are building</span><span>
</span><span id="line-1480"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.NubList.html#NubListR"><span class="hs-identifier hs-type">NubListR</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1481"></span><span id="getRPaths"><span class="annot"><span class="annottext">getRPaths :: LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; IO (NubListR String)
</span><a href="Distribution.Simple.GHCJS.html#getRPaths"><span class="hs-identifier hs-var hs-var">getRPaths</span></a></span></span><span> </span><span id="local-6989586621679717835"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717835"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679717834"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717834"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OS -&gt; Bool
</span><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679717832"><span class="hs-identifier hs-var">hostOS</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1482"></span><span>    </span><span id="local-6989586621679717831"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679717831"><span class="hs-identifier hs-var">libraryPaths</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; Bool -&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; IO [String]
</span><a href="Distribution.Simple.LocalBuildInfo.html#depLibraryPaths"><span class="hs-identifier hs-var">depLibraryPaths</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#relocatable"><span class="hs-identifier hs-var hs-var">relocatable</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717835"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717835"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717834"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-1483"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717828"><span class="annot"><span class="annottext">hostPref :: String
</span><a href="#local-6989586621679717828"><span class="hs-identifier hs-var hs-var">hostPref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679717832"><span class="hs-identifier hs-var">hostOS</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1484"></span><span>                     </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#OSX"><span class="hs-identifier hs-var">OSX</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;@loader_path&quot;</span></span><span>
</span><span id="line-1485"></span><span>                     </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;$ORIGIN&quot;</span></span><span>
</span><span id="line-1486"></span><span>        </span><span id="local-6989586621679717826"><span class="annot"><span class="annottext">relPath :: String -&gt; String
</span><a href="#local-6989586621679717826"><span class="hs-identifier hs-var hs-var">relPath</span></a></span></span><span> </span><span id="local-6989586621679717825"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717825"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="../../filepath/src/System.FilePath.Windows.html#isRelative"><span class="hs-identifier hs-var">isRelative</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717825"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717828"><span class="hs-identifier hs-var">hostPref</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717825"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717825"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-1487"></span><span>        </span><span id="local-6989586621679717822"><span class="annot"><span class="annottext">rpaths :: NubListR String
</span><a href="#local-6989586621679717822"><span class="hs-identifier hs-var hs-var">rpaths</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; NubListR String
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; [String] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679717826"><span class="hs-identifier hs-var">relPath</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679717831"><span class="hs-identifier hs-var">libraryPaths</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1488"></span><span>    </span><span class="annot"><span class="annottext">NubListR String -&gt; IO (NubListR String)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">NubListR String
</span><a href="#local-6989586621679717822"><span class="hs-identifier hs-var">rpaths</span></a></span><span>
</span><span id="line-1489"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1490"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679717832"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679717832"><span class="hs-identifier hs-var">hostOS</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717835"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1491"></span><span>    </span><span id="local-6989586621679717821"><span class="annot"><span class="annottext">compid :: CompilerId
</span><a href="#local-6989586621679717821"><span class="hs-identifier hs-var hs-var">compid</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span><span> </span><span class="annot"><span class="annottext">(Compiler -&gt; CompilerId)
-&gt; (LocalBuildInfo -&gt; Compiler) -&gt; LocalBuildInfo -&gt; CompilerId
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">(LocalBuildInfo -&gt; CompilerId) -&gt; LocalBuildInfo -&gt; CompilerId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717835"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1492"></span><span>
</span><span id="line-1493"></span><span>    </span><span class="hs-comment">-- The list of RPath-supported operating systems below reflects the</span><span>
</span><span id="line-1494"></span><span>    </span><span class="hs-comment">-- platforms on which Cabal's RPATH handling is tested. It does _NOT_</span><span>
</span><span id="line-1495"></span><span>    </span><span class="hs-comment">-- reflect whether the OS supports RPATH.</span><span>
</span><span id="line-1496"></span><span>
</span><span id="line-1497"></span><span>    </span><span class="hs-comment">-- E.g. when this comment was written, the *BSD operating systems were</span><span>
</span><span id="line-1498"></span><span>    </span><span class="hs-comment">-- untested with regards to Cabal RPATH handling, and were hence set to</span><span>
</span><span id="line-1499"></span><span>    </span><span class="hs-comment">-- 'False', while those operating systems themselves do support RPATH.</span><span>
</span><span id="line-1500"></span><span>    </span><span id="local-6989586621679717833"><span class="annot"><span class="annottext">supportRPaths :: OS -&gt; Bool
</span><a href="#local-6989586621679717833"><span class="hs-identifier hs-var hs-var">supportRPaths</span></a></span></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Linux"><span class="hs-identifier hs-var">Linux</span></a></span><span>   &#160;   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1501"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Windows"><span class="hs-identifier hs-var">Windows</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1502"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#OSX"><span class="hs-identifier hs-var">OSX</span></a></span><span>     &#160;   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1503"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#FreeBSD"><span class="hs-identifier hs-var">FreeBSD</span></a></span><span> &#160;   </span><span class="hs-glyph">=</span><span>
</span><span id="line-1504"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CompilerId
</span><a href="#local-6989586621679717821"><span class="hs-identifier hs-var">compid</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1505"></span><span>        </span><span class="annot"><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-type">CompilerId</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span id="local-6989586621679717818"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679717818"><span class="hs-identifier hs-var">ver</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679717818"><span class="hs-identifier hs-var">ver</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1506"></span><span>        </span><span class="annot"><span class="annottext">CompilerId
</span><span class="hs-identifier">_</span></span><span>                                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1507"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#OpenBSD"><span class="hs-identifier hs-var">OpenBSD</span></a></span><span> &#160;   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1508"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#NetBSD"><span class="hs-identifier hs-var">NetBSD</span></a></span><span>  &#160;   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1509"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#DragonFly"><span class="hs-identifier hs-var">DragonFly</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1510"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Solaris"><span class="hs-identifier hs-var">Solaris</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1511"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#AIX"><span class="hs-identifier hs-var">AIX</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1512"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#HPUX"><span class="hs-identifier hs-var">HPUX</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1513"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#IRIX"><span class="hs-identifier hs-var">IRIX</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1514"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#HaLVM"><span class="hs-identifier hs-var">HaLVM</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1515"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#IOS"><span class="hs-identifier hs-var">IOS</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1516"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Android"><span class="hs-identifier hs-var">Android</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1517"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Ghcjs"><span class="hs-identifier hs-var">Ghcjs</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1518"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="Distribution.System.html#Hurd"><span class="hs-identifier hs-var">Hurd</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1519"></span><span>    </span><span class="annot"><a href="#local-6989586621679717833"><span class="hs-identifier hs-var">supportRPaths</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#OtherOS"><span class="hs-identifier hs-type">OtherOS</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1520"></span><span>    </span><span class="hs-comment">-- Do _not_ add a default case so that we get a warning here when a new OS</span><span>
</span><span id="line-1521"></span><span>    </span><span class="hs-comment">-- is added.</span><span>
</span><span id="line-1522"></span><span>
</span><span id="line-1523"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#getRPaths"><span class="hs-identifier hs-var">getRPaths</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NubListR String -&gt; IO (NubListR String)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">NubListR String
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-1524"></span><span>
</span><span id="line-1525"></span><span class="hs-comment">-- | Remove the &quot;-threaded&quot; flag when building a foreign library, as it has no</span><span>
</span><span id="line-1526"></span><span class="hs-comment">--   effect when used with &quot;-shared&quot;. Returns the updated 'BuildInfo', along</span><span>
</span><span id="line-1527"></span><span class="hs-comment">--   with whether or not the flag was present, so we can use it to link against</span><span>
</span><span id="line-1528"></span><span class="hs-comment">--   the appropriate RTS on our own.</span><span>
</span><span id="line-1529"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#popThreadedFlag"><span class="hs-identifier hs-type">popThreadedFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span>
</span><span id="line-1530"></span><span id="popThreadedFlag"><span class="annot"><span class="annottext">popThreadedFlag :: BuildInfo -&gt; (BuildInfo, Bool)
</span><a href="Distribution.Simple.GHCJS.html#popThreadedFlag"><span class="hs-identifier hs-var hs-var">popThreadedFlag</span></a></span></span><span> </span><span id="local-6989586621679717804"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717804"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1531"></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717804"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">options :: PerCompilerFlavor [String]
</span><a href="Distribution.Types.BuildInfo.html#options"><span class="hs-identifier hs-var">options</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool)
-&gt; PerCompilerFlavor [String] -&gt; PerCompilerFlavor [String]
</span><a href="#local-6989586621679717802"><span class="hs-identifier hs-var">filterHcOptions</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-threaded&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; PerCompilerFlavor [String]
</span><a href="Distribution.Types.BuildInfo.html#options"><span class="hs-identifier hs-var hs-var">options</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717804"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1532"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PerCompilerFlavor [String] -&gt; Bool
</span><a href="#local-6989586621679717801"><span class="hs-identifier hs-var">hasThreaded</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; PerCompilerFlavor [String]
</span><a href="Distribution.Types.BuildInfo.html#options"><span class="hs-identifier hs-var hs-var">options</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717804"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1533"></span><span>
</span><span id="line-1534"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1535"></span><span>    </span><span class="annot"><a href="#local-6989586621679717802"><span class="hs-identifier hs-type">filterHcOptions</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span>
</span><span id="line-1536"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#PerCompilerFlavor"><span class="hs-identifier hs-type">PerCompilerFlavor</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1537"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#PerCompilerFlavor"><span class="hs-identifier hs-type">PerCompilerFlavor</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1538"></span><span>    </span><span id="local-6989586621679717802"><span class="annot"><span class="annottext">filterHcOptions :: (String -&gt; Bool)
-&gt; PerCompilerFlavor [String] -&gt; PerCompilerFlavor [String]
</span><a href="#local-6989586621679717802"><span class="hs-identifier hs-var hs-var">filterHcOptions</span></a></span></span><span> </span><span id="local-6989586621679717800"><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="#local-6989586621679717800"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compiler.html#PerCompilerFlavor"><span class="hs-identifier hs-type">PerCompilerFlavor</span></a></span><span> </span><span id="local-6989586621679717798"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679717798"><span class="hs-identifier hs-var">ghc</span></a></span></span><span> </span><span id="local-6989586621679717797"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679717797"><span class="hs-identifier hs-var">ghcjs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1539"></span><span>        </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; PerCompilerFlavor [String]
forall v. v -&gt; v -&gt; PerCompilerFlavor v
</span><a href="Distribution.Compiler.html#PerCompilerFlavor"><span class="hs-identifier hs-var">PerCompilerFlavor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; [String]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="#local-6989586621679717800"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679717798"><span class="hs-identifier hs-var">ghc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679717797"><span class="hs-identifier hs-var">ghcjs</span></a></span><span>
</span><span id="line-1540"></span><span>
</span><span id="line-1541"></span><span>    </span><span class="annot"><a href="#local-6989586621679717801"><span class="hs-identifier hs-type">hasThreaded</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#PerCompilerFlavor"><span class="hs-identifier hs-type">PerCompilerFlavor</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1542"></span><span>    </span><span id="local-6989586621679717801"><span class="annot"><span class="annottext">hasThreaded :: PerCompilerFlavor [String] -&gt; Bool
</span><a href="#local-6989586621679717801"><span class="hs-identifier hs-var hs-var">hasThreaded</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compiler.html#PerCompilerFlavor"><span class="hs-identifier hs-type">PerCompilerFlavor</span></a></span><span> </span><span id="local-6989586621679717796"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679717796"><span class="hs-identifier hs-var">ghc</span></a></span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-identifier hs-var">elem</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-threaded&quot;</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679717796"><span class="hs-identifier hs-var">ghc</span></a></span><span>
</span><span id="line-1543"></span><span>
</span><span id="line-1544"></span><span class="hs-comment">-- | Extracts a String representing a hash of the ABI of a built</span><span>
</span><span id="line-1545"></span><span class="hs-comment">-- library.  It can fail if the library has not yet been built.</span><span>
</span><span id="line-1546"></span><span class="hs-comment">--</span><span>
</span><span id="line-1547"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#libAbiHash"><span class="hs-identifier hs-type">libAbiHash</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-1548"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-1549"></span><span id="libAbiHash"><span class="annot"><span class="annottext">libAbiHash :: Verbosity
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#libAbiHash"><span class="hs-identifier hs-var hs-var">libAbiHash</span></a></span></span><span> </span><span id="local-6989586621679717795"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717795"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717794"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679717794"><span class="hs-identifier hs-var">_pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679717793"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679717792"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717792"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679717791"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717791"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1550"></span><span>  </span><span class="hs-keyword">let</span><span>
</span><span id="line-1551"></span><span>      </span><span id="local-6989586621679717790"><span class="annot"><span class="annottext">libBi :: BuildInfo
</span><a href="#local-6989586621679717790"><span class="hs-identifier hs-var hs-var">libBi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717792"><span class="hs-identifier hs-var">lib</span></a></span><span>
</span><span id="line-1552"></span><span>      </span><span id="local-6989586621679717789"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679717789"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1553"></span><span>      </span><span id="local-6989586621679717788"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621679717788"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1554"></span><span>      </span><span id="local-6989586621679717784"><span class="annot"><span class="annottext">vanillaArgs0 :: GhcOptions
</span><a href="#local-6989586621679717784"><span class="hs-identifier hs-var hs-var">vanillaArgs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1555"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Verbosity
-&gt; LocalBuildInfo
-&gt; BuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; GhcOptions
</span><a href="Distribution.Simple.GHCJS.html#componentGhcOptions"><span class="hs-identifier hs-var">componentGhcOptions</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717795"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717790"><span class="hs-identifier hs-var">libBi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717791"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.LocalBuildInfo.html#componentBuildDir"><span class="hs-identifier hs-var">componentBuildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717791"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1556"></span><span>        </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1557"></span><span>          </span><span class="annot"><span class="annottext">ghcOptMode :: Flag GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptMode"><span class="hs-identifier hs-var">ghcOptMode</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcMode -&gt; Flag GhcMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcModeAbiHash"><span class="hs-identifier hs-var">GhcModeAbiHash</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1558"></span><span>          </span><span class="annot"><span class="annottext">ghcOptInputModules :: NubListR ModuleName
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptInputModules"><span class="hs-identifier hs-var">ghcOptInputModules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; NubListR ModuleName
forall a. Ord a =&gt; [a] -&gt; NubListR a
</span><a href="Distribution.Utils.NubList.html#toNubListR"><span class="hs-identifier hs-var">toNubListR</span></a></span><span> </span><span class="annot"><span class="annottext">([ModuleName] -&gt; NubListR ModuleName)
-&gt; [ModuleName] -&gt; NubListR ModuleName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Library -&gt; [ModuleName]
</span><a href="Distribution.Types.Library.html#exposedModules"><span class="hs-identifier hs-var hs-var">exposedModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717792"><span class="hs-identifier hs-var">lib</span></a></span><span>
</span><span id="line-1559"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-1560"></span><span>      </span><span id="local-6989586621679717777"><span class="annot"><span class="annottext">vanillaArgs :: GhcOptions
</span><a href="#local-6989586621679717777"><span class="hs-identifier hs-var hs-var">vanillaArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1561"></span><span>          </span><span class="hs-comment">-- Package DBs unnecessary, and break ghc-cabal. See #3633</span><span>
</span><span id="line-1562"></span><span>          </span><span class="hs-comment">-- BUT, put at least the global database so that 7.4 doesn't</span><span>
</span><span id="line-1563"></span><span>          </span><span class="hs-comment">-- break.</span><span>
</span><span id="line-1564"></span><span>          </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717784"><span class="hs-identifier hs-var">vanillaArgs0</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ghcOptPackageDBs :: [PackageDB]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptPackageDBs"><span class="hs-identifier hs-var">ghcOptPackageDBs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1565"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ghcOptPackages :: NubListR (OpenUnitId, ModuleRenaming)
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptPackages"><span class="hs-identifier hs-var">ghcOptPackages</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NubListR (OpenUnitId, ModuleRenaming)
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1566"></span><span>      </span><span id="local-6989586621679717774"><span class="annot"><span class="annottext">sharedArgs :: GhcOptions
</span><a href="#local-6989586621679717774"><span class="hs-identifier hs-var hs-var">sharedArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717777"><span class="hs-identifier hs-var">vanillaArgs</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1567"></span><span>                       </span><span class="annot"><span class="annottext">ghcOptDynLinkMode :: Flag GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptDynLinkMode"><span class="hs-identifier hs-var">ghcOptDynLinkMode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode -&gt; Flag GhcDynLinkMode
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">GhcDynLinkMode
</span><a href="Distribution.Simple.Program.GHC.html#GhcDynamicOnly"><span class="hs-identifier hs-var">GhcDynamicOnly</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1568"></span><span>                       </span><span class="annot"><span class="annottext">ghcOptFPic :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptFPic"><span class="hs-identifier hs-var">ghcOptFPic</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-1569"></span><span>                       </span><span class="annot"><span class="annottext">ghcOptHiSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHiSuffix"><span class="hs-identifier hs-var">ghcOptHiSuffix</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_dyn_hi&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1570"></span><span>                       </span><span class="annot"><span class="annottext">ghcOptObjSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptObjSuffix"><span class="hs-identifier hs-var">ghcOptObjSuffix</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_dyn_o&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1571"></span><span>                       </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcSharedOptions"><span class="hs-identifier hs-var">hcSharedOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717790"><span class="hs-identifier hs-var">libBi</span></a></span><span>
</span><span id="line-1572"></span><span>                   </span><span class="hs-special">}</span><span>
</span><span id="line-1573"></span><span>      </span><span id="local-6989586621679717771"><span class="annot"><span class="annottext">profArgs :: GhcOptions
</span><a href="#local-6989586621679717771"><span class="hs-identifier hs-var hs-var">profArgs</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717777"><span class="hs-identifier hs-var">vanillaArgs</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1574"></span><span>                     </span><span class="annot"><span class="annottext">ghcOptProfilingMode :: Flag Bool
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptProfilingMode"><span class="hs-identifier hs-var">ghcOptProfilingMode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Flag Bool
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span>
</span><span id="line-1575"></span><span>                     </span><span class="annot"><span class="annottext">ghcOptProfilingAuto :: Flag GhcProfAuto
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptProfilingAuto"><span class="hs-identifier hs-var">ghcOptProfilingAuto</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ProfDetailLevel -&gt; Flag GhcProfAuto
</span><a href="Distribution.Simple.GHC.Internal.html#profDetailLevelFlag"><span class="hs-identifier hs-var">Internal.profDetailLevelFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1576"></span><span>                                             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProfDetailLevel
</span><a href="Distribution.Types.LocalBuildInfo.html#withProfLibDetail"><span class="hs-identifier hs-var hs-var">withProfLibDetail</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1577"></span><span>                     </span><span class="annot"><span class="annottext">ghcOptHiSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHiSuffix"><span class="hs-identifier hs-var">ghcOptHiSuffix</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_p_hi&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1578"></span><span>                     </span><span class="annot"><span class="annottext">ghcOptObjSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptObjSuffix"><span class="hs-identifier hs-var">ghcOptObjSuffix</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_p_o&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1579"></span><span>                     </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcProfOptions"><span class="hs-identifier hs-var">hcProfOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717790"><span class="hs-identifier hs-var">libBi</span></a></span><span>
</span><span id="line-1580"></span><span>                   </span><span class="hs-special">}</span><span>
</span><span id="line-1581"></span><span>      </span><span id="local-6989586621679717768"><span class="annot"><span class="annottext">ghcArgs :: GhcOptions
</span><a href="#local-6989586621679717768"><span class="hs-identifier hs-var hs-var">ghcArgs</span></a></span></span><span>
</span><span id="line-1582"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withVanillaLib"><span class="hs-identifier hs-var hs-var">withVanillaLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717777"><span class="hs-identifier hs-var">vanillaArgs</span></a></span><span>
</span><span id="line-1583"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withSharedLib"><span class="hs-identifier hs-var hs-var">withSharedLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717774"><span class="hs-identifier hs-var">sharedArgs</span></a></span><span>
</span><span id="line-1584"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withProfLib"><span class="hs-identifier hs-var hs-var">withProfLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717771"><span class="hs-identifier hs-var">profArgs</span></a></span><span>
</span><span id="line-1585"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; GhcOptions
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;libAbiHash: Can't find an enabled library way&quot;</span></span><span>
</span><span id="line-1586"></span><span>
</span><span id="line-1587"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679717767"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717767"><span class="hs-identifier hs-var">ghcjsProg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; Program -&gt; ProgramDb -&gt; IO (ConfiguredProgram, ProgramDb)
</span><a href="Distribution.Simple.Program.Db.html#requireProgram"><span class="hs-identifier hs-var">requireProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717795"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717793"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1588"></span><span>  </span><span id="local-6989586621679717766"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717766"><span class="hs-identifier hs-var">hash</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; ProgramInvocation -&gt; IO String
</span><a href="Distribution.Simple.Program.Run.html#getProgramInvocationOutput"><span class="hs-identifier hs-var">getProgramInvocationOutput</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717795"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-1589"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredProgram
-&gt; Compiler -&gt; Platform -&gt; GhcOptions -&gt; ProgramInvocation
</span><a href="Distribution.Simple.Program.GHC.html#ghcInvocation"><span class="hs-identifier hs-var">ghcInvocation</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717767"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679717789"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679717788"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717768"><span class="hs-identifier hs-var">ghcArgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1590"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; String
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#takeWhile"><span class="hs-identifier hs-var">takeWhile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (Char -&gt; Bool) -&gt; Char -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717766"><span class="hs-identifier hs-var">hash</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1591"></span><span>
</span><span id="line-1592"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#componentGhcOptions"><span class="hs-identifier hs-type">componentGhcOptions</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-1593"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1594"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.GHC.html#GhcOptions"><span class="hs-identifier hs-type">GhcOptions</span></a></span><span>
</span><span id="line-1595"></span><span id="componentGhcOptions"><span class="annot"><span class="annottext">componentGhcOptions :: Verbosity
-&gt; LocalBuildInfo
-&gt; BuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; GhcOptions
</span><a href="Distribution.Simple.GHCJS.html#componentGhcOptions"><span class="hs-identifier hs-var hs-var">componentGhcOptions</span></a></span></span><span> </span><span id="local-6989586621679717763"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717763"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717762"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717762"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679717761"><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717761"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span id="local-6989586621679717760"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717760"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span id="local-6989586621679717759"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717759"><span class="hs-identifier hs-var">odir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1596"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717758"><span class="annot"><span class="annottext">opts :: GhcOptions
</span><a href="#local-6989586621679717758"><span class="hs-identifier hs-var hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; GhcImplInfo
-&gt; LocalBuildInfo
-&gt; BuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; GhcOptions
</span><a href="Distribution.Simple.GHC.Internal.html#componentGhcOptions"><span class="hs-identifier hs-var">Internal.componentGhcOptions</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717763"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679717756"><span class="hs-identifier hs-var">implInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717762"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717761"><span class="hs-identifier hs-var">bi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717760"><span class="hs-identifier hs-var">clbi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717759"><span class="hs-identifier hs-var">odir</span></a></span><span>
</span><span id="line-1597"></span><span>      </span><span id="local-6989586621679717755"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679717755"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717762"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1598"></span><span>      </span><span id="local-6989586621679717756"><span class="annot"><span class="annottext">implInfo :: GhcImplInfo
</span><a href="#local-6989586621679717756"><span class="hs-identifier hs-var hs-var">implInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; GhcImplInfo
</span><a href="Distribution.Simple.GHC.ImplInfo.html#getImplInfo"><span class="hs-identifier hs-var">getImplInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679717755"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-1599"></span><span>  </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717758"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ghcOptExtra :: [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var">ghcOptExtra</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; [String]
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptExtra"><span class="hs-identifier hs-var hs-var">ghcOptExtra</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717758"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#hcOptions"><span class="hs-identifier hs-var">hcOptions</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679717761"><span class="hs-identifier hs-var">bi</span></a></span><span>
</span><span id="line-1600"></span><span>           </span><span class="hs-special">}</span><span>
</span><span id="line-1601"></span><span>
</span><span id="line-1602"></span><span>
</span><span id="line-1603"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#componentCcGhcOptions"><span class="hs-identifier hs-type">componentCcGhcOptions</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-1604"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.BuildInfo.html#BuildInfo"><span class="hs-identifier hs-type">BuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-1605"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1606"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.GHC.html#GhcOptions"><span class="hs-identifier hs-type">GhcOptions</span></a></span><span>
</span><span id="line-1607"></span><span id="componentCcGhcOptions"><span class="annot"><span class="annottext">componentCcGhcOptions :: Verbosity
-&gt; LocalBuildInfo
-&gt; BuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; String
-&gt; GhcOptions
</span><a href="Distribution.Simple.GHCJS.html#componentCcGhcOptions"><span class="hs-identifier hs-var hs-var">componentCcGhcOptions</span></a></span></span><span> </span><span id="local-6989586621679717754"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717754"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717753"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717753"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1608"></span><span>    </span><span class="annot"><span class="annottext">Verbosity
-&gt; GhcImplInfo
-&gt; LocalBuildInfo
-&gt; BuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; String
-&gt; String
-&gt; GhcOptions
</span><a href="Distribution.Simple.GHC.Internal.html#componentCcGhcOptions"><span class="hs-identifier hs-var">Internal.componentCcGhcOptions</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717754"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">GhcImplInfo
</span><a href="#local-6989586621679717752"><span class="hs-identifier hs-var">implInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717753"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1609"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1610"></span><span>    </span><span id="local-6989586621679717751"><span class="annot"><span class="annottext">comp :: Compiler
</span><a href="#local-6989586621679717751"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717753"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1611"></span><span>    </span><span id="local-6989586621679717752"><span class="annot"><span class="annottext">implInfo :: GhcImplInfo
</span><a href="#local-6989586621679717752"><span class="hs-identifier hs-var hs-var">implInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; GhcImplInfo
</span><a href="Distribution.Simple.GHC.ImplInfo.html#getImplInfo"><span class="hs-identifier hs-var">getImplInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679717751"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-1612"></span><span>
</span><span id="line-1613"></span><span>
</span><span id="line-1614"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-1615"></span><span class="hs-comment">-- Installing</span><span>
</span><span id="line-1616"></span><span>
</span><span id="line-1617"></span><span class="hs-comment">-- |Install executables for GHCJS.</span><span>
</span><span id="line-1618"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#installExe"><span class="hs-identifier hs-type">installExe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-1619"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-1620"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-comment">-- ^Where to copy the files to</span><span>
</span><span id="line-1621"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- ^Build location</span><span>
</span><span id="line-1622"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- ^Executable (prefix,suffix)</span><span>
</span><span id="line-1623"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-1624"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Executable.html#Executable"><span class="hs-identifier hs-type">Executable</span></a></span><span>
</span><span id="line-1625"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1626"></span><span id="installExe"><span class="annot"><span class="annottext">installExe :: Verbosity
-&gt; LocalBuildInfo
-&gt; String
-&gt; String
-&gt; (String, String)
-&gt; PackageDescription
-&gt; Executable
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#installExe"><span class="hs-identifier hs-var hs-var">installExe</span></a></span></span><span> </span><span id="local-6989586621679717750"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717750"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717749"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717749"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679717748"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717748"><span class="hs-identifier hs-var">binDir</span></a></span></span><span> </span><span id="local-6989586621679717747"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717747"><span class="hs-identifier hs-var">buildPref</span></a></span></span><span>
</span><span id="line-1627"></span><span>           </span><span class="hs-special">(</span><span id="local-6989586621679717746"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717746"><span class="hs-identifier hs-var">progprefix</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679717745"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717745"><span class="hs-identifier hs-var">progsuffix</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679717744"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679717744"><span class="hs-identifier hs-var">_pkg</span></a></span></span><span> </span><span id="local-6989586621679717743"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679717743"><span class="hs-identifier hs-var">exe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1628"></span><span>  </span><span class="annot"><span class="annottext">Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#createDirectoryIfMissingVerbose"><span class="hs-identifier hs-var">createDirectoryIfMissingVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717750"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717748"><span class="hs-identifier hs-var">binDir</span></a></span><span>
</span><span id="line-1629"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717742"><span class="annot"><span class="annottext">exeName' :: String
</span><a href="#local-6989586621679717742"><span class="hs-identifier hs-var hs-var">exeName'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Executable -&gt; UnqualComponentName
</span><a href="Distribution.Types.Executable.html#exeName"><span class="hs-identifier hs-var hs-var">exeName</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679717743"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-1630"></span><span>      </span><span id="local-6989586621679717741"><span class="annot"><span class="annottext">exeFileName :: String
</span><a href="#local-6989586621679717741"><span class="hs-identifier hs-var hs-var">exeFileName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717742"><span class="hs-identifier hs-var">exeName'</span></a></span><span>
</span><span id="line-1631"></span><span>      </span><span id="local-6989586621679717740"><span class="annot"><span class="annottext">fixedExeBaseName :: String
</span><a href="#local-6989586621679717740"><span class="hs-identifier hs-var hs-var">fixedExeBaseName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717746"><span class="hs-identifier hs-var">progprefix</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717742"><span class="hs-identifier hs-var">exeName'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717745"><span class="hs-identifier hs-var">progsuffix</span></a></span><span>
</span><span id="line-1632"></span><span>      </span><span id="local-6989586621679717739"><span class="annot"><span class="annottext">installBinary :: String -&gt; IO ()
</span><a href="#local-6989586621679717739"><span class="hs-identifier hs-var hs-var">installBinary</span></a></span></span><span> </span><span id="local-6989586621679717738"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717738"><span class="hs-identifier hs-var">dest</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1633"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; Program -&gt; ProgramDb -&gt; [String] -&gt; IO ()
</span><a href="Distribution.Simple.Program.html#runDbProgram"><span class="hs-identifier hs-var">runDbProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717750"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717749"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; IO ()) -&gt; [String] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1634"></span><span>          </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--install-executable&quot;</span></span><span>
</span><span id="line-1635"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717747"><span class="hs-identifier hs-var">buildPref</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717742"><span class="hs-identifier hs-var">exeName'</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717741"><span class="hs-identifier hs-var">exeFileName</span></a></span><span>
</span><span id="line-1636"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-o&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717738"><span class="hs-identifier hs-var">dest</span></a></span><span>
</span><span id="line-1637"></span><span>          </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-1638"></span><span>          </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#stripExes"><span class="hs-identifier hs-var hs-var">stripExes</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717749"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; Maybe ConfiguredProgram
</span><a href="Distribution.Simple.Program.Db.html#lookupProgram"><span class="hs-identifier hs-var">lookupProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#stripProgram"><span class="hs-identifier hs-var">stripProgram</span></a></span><span> </span><span class="annot"><span class="annottext">(ProgramDb -&gt; Maybe ConfiguredProgram)
-&gt; ProgramDb -&gt; Maybe ConfiguredProgram
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717749"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1639"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679717734"><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717734"><span class="hs-identifier hs-var">strip</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-strip-program&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717734"><span class="hs-identifier hs-var">strip</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1640"></span><span>           </span><span class="annot"><span class="annottext">(Bool, Maybe ConfiguredProgram)
</span><span class="hs-identifier">_</span></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1641"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="#local-6989586621679717739"><span class="hs-identifier hs-var">installBinary</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717748"><span class="hs-identifier hs-var">binDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717740"><span class="hs-identifier hs-var">fixedExeBaseName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1642"></span><span>
</span><span id="line-1643"></span><span>
</span><span id="line-1644"></span><span class="hs-comment">-- |Install foreign library for GHC.</span><span>
</span><span id="line-1645"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#installFLib"><span class="hs-identifier hs-type">installFLib</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-1646"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-1647"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- ^install location</span><span>
</span><span id="line-1648"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- ^Build location</span><span>
</span><span id="line-1649"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-1650"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html#ForeignLib"><span class="hs-identifier hs-type">ForeignLib</span></a></span><span>
</span><span id="line-1651"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1652"></span><span id="installFLib"><span class="annot"><span class="annottext">installFLib :: Verbosity
-&gt; LocalBuildInfo
-&gt; String
-&gt; String
-&gt; PackageDescription
-&gt; ForeignLib
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#installFLib"><span class="hs-identifier hs-var hs-var">installFLib</span></a></span></span><span> </span><span id="local-6989586621679717733"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717733"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717732"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717732"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679717731"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717731"><span class="hs-identifier hs-var">targetDir</span></a></span></span><span> </span><span id="local-6989586621679717730"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717730"><span class="hs-identifier hs-var">builtDir</span></a></span></span><span> </span><span id="local-6989586621679717729"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679717729"><span class="hs-identifier hs-var">_pkg</span></a></span></span><span> </span><span id="local-6989586621679717728"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679717728"><span class="hs-identifier hs-var">flib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1653"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; String -&gt; String -&gt; String -&gt; IO ()
forall {p}. p -&gt; String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717727"><span class="hs-identifier hs-var">install</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignLib -&gt; Bool
</span><a href="Distribution.Types.ForeignLib.html#foreignLibIsShared"><span class="hs-identifier hs-var">foreignLibIsShared</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679717728"><span class="hs-identifier hs-var">flib</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1654"></span><span>            </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717730"><span class="hs-identifier hs-var">builtDir</span></a></span><span>
</span><span id="line-1655"></span><span>            </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717731"><span class="hs-identifier hs-var">targetDir</span></a></span><span>
</span><span id="line-1656"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ForeignLib -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#flibTargetName"><span class="hs-identifier hs-var">flibTargetName</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717732"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679717728"><span class="hs-identifier hs-var">flib</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1657"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1658"></span><span>    </span><span id="local-6989586621679717727"><span class="annot"><span class="annottext">install :: p -&gt; String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717727"><span class="hs-identifier hs-var hs-var">install</span></a></span></span><span> </span><span id="local-6989586621679717724"><span class="annot"><span class="annottext">p
</span><a href="#local-6989586621679717724"><span class="hs-identifier hs-var">_isShared</span></a></span></span><span> </span><span id="local-6989586621679717723"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717723"><span class="hs-identifier hs-var">srcDir</span></a></span></span><span> </span><span id="local-6989586621679717722"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717722"><span class="hs-identifier hs-var">dstDir</span></a></span></span><span> </span><span id="local-6989586621679717721"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717721"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1659"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717720"><span class="annot"><span class="annottext">src :: String
</span><a href="#local-6989586621679717720"><span class="hs-identifier hs-var hs-var">src</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717723"><span class="hs-identifier hs-var">srcDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717721"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-1660"></span><span>          </span><span id="local-6989586621679717719"><span class="annot"><span class="annottext">dst :: String
</span><a href="#local-6989586621679717719"><span class="hs-identifier hs-var hs-var">dst</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717722"><span class="hs-identifier hs-var">dstDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717721"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-1661"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#createDirectoryIfMissingVerbose"><span class="hs-identifier hs-var">createDirectoryIfMissingVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717733"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717731"><span class="hs-identifier hs-var">targetDir</span></a></span><span>
</span><span id="line-1662"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#installOrdinaryFile"><span class="hs-identifier hs-var">installOrdinaryFile</span></a></span><span>   </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717733"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717720"><span class="hs-identifier hs-var">src</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717719"><span class="hs-identifier hs-var">dst</span></a></span><span>
</span><span id="line-1663"></span><span>
</span><span id="line-1664"></span><span>
</span><span id="line-1665"></span><span class="hs-comment">-- |Install for ghc, .hi, .a and, if --with-ghci given, .o</span><span>
</span><span id="line-1666"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#installLib"><span class="hs-identifier hs-type">installLib</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-1667"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span>
</span><span id="line-1668"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- ^install location</span><span>
</span><span id="line-1669"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- ^install location for dynamic libraries</span><span>
</span><span id="line-1670"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- ^Build location</span><span>
</span><span id="line-1671"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-1672"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Library.html#Library"><span class="hs-identifier hs-type">Library</span></a></span><span>
</span><span id="line-1673"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-1674"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1675"></span><span id="installLib"><span class="annot"><span class="annottext">installLib :: Verbosity
-&gt; LocalBuildInfo
-&gt; String
-&gt; String
-&gt; String
-&gt; PackageDescription
-&gt; Library
-&gt; ComponentLocalBuildInfo
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#installLib"><span class="hs-identifier hs-var hs-var">installLib</span></a></span></span><span> </span><span id="local-6989586621679717717"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717717"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717716"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679717715"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717715"><span class="hs-identifier hs-var">targetDir</span></a></span></span><span> </span><span id="local-6989586621679717714"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717714"><span class="hs-identifier hs-var">dynlibTargetDir</span></a></span></span><span> </span><span id="local-6989586621679717713"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717713"><span class="hs-identifier hs-var">_builtDir</span></a></span></span><span> </span><span id="local-6989586621679717712"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679717712"><span class="hs-identifier hs-var">_pkg</span></a></span></span><span> </span><span id="local-6989586621679717711"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span id="local-6989586621679717710"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717710"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1676"></span><span>  </span><span class="annot"><span class="annottext">IO () -&gt; IO ()
</span><a href="#local-6989586621679717709"><span class="hs-identifier hs-var">whenVanilla</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="#local-6989586621679717708"><span class="hs-identifier hs-var">copyModuleFiles</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_hi&quot;</span></span><span>
</span><span id="line-1677"></span><span>  </span><span class="annot"><span class="annottext">IO () -&gt; IO ()
</span><a href="#local-6989586621679717707"><span class="hs-identifier hs-var">whenProf</span></a></span><span>    </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="#local-6989586621679717708"><span class="hs-identifier hs-var">copyModuleFiles</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_p_hi&quot;</span></span><span>
</span><span id="line-1678"></span><span>  </span><span class="annot"><span class="annottext">IO () -&gt; IO ()
</span><a href="#local-6989586621679717706"><span class="hs-identifier hs-var">whenShared</span></a></span><span>  </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="#local-6989586621679717708"><span class="hs-identifier hs-var">copyModuleFiles</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js_dyn_hi&quot;</span></span><span>
</span><span id="line-1679"></span><span>
</span><span id="line-1680"></span><span>  </span><span class="hs-comment">-- whenVanilla $ installOrdinary builtDir targetDir $ toJSLibName vanillaLibName</span><span>
</span><span id="line-1681"></span><span>  </span><span class="hs-comment">-- whenProf    $ installOrdinary builtDir targetDir $ toJSLibName profileLibName</span><span>
</span><span id="line-1682"></span><span>  </span><span class="hs-comment">-- whenShared  $ installShared   builtDir dynlibTargetDir $ toJSLibName sharedLibName</span><span>
</span><span id="line-1683"></span><span>  </span><span class="hs-comment">-- fixme do these make the correct lib names?</span><span>
</span><span id="line-1684"></span><span>  </span><span class="annot"><span class="annottext">IO () -&gt; IO ()
</span><a href="#local-6989586621679717705"><span class="hs-identifier hs-var">whenHasCode</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1685"></span><span>    </span><span class="annot"><span class="annottext">IO () -&gt; IO ()
</span><a href="#local-6989586621679717709"><span class="hs-identifier hs-var">whenVanilla</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1686"></span><span>      </span><span class="annot"><span class="annottext">[IO ()] -&gt; IO ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Foldable t, Monad m) =&gt;
t (m a) -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#sequence_"><span class="hs-identifier hs-var">sequence_</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717704"><span class="hs-identifier hs-var">installOrdinary</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717703"><span class="hs-identifier hs-var">builtDir'</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717715"><span class="hs-identifier hs-var">targetDir</span></a></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#toJSLibName"><span class="hs-identifier hs-var">toJSLibName</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#mkGenericStaticLibName"><span class="hs-identifier hs-var">mkGenericStaticLibName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717701"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717700"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1687"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679717701"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717701"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; String
</span><a href="Distribution.Types.UnitId.html#getHSLibraryName"><span class="hs-identifier hs-var">getHSLibraryName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; UnitId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentUnitId"><span class="hs-identifier hs-var hs-var">componentUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717710"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraBundledLibs"><span class="hs-identifier hs-var hs-var">extraBundledLibs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1688"></span><span>                </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679717700"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717700"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraLibFlavours"><span class="hs-identifier hs-var hs-var">extraLibFlavours</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1689"></span><span>                </span><span class="hs-special">]</span><span>
</span><span id="line-1690"></span><span>      </span><span class="hs-comment">-- whenGHCi $ installOrdinary builtDir targetDir (toJSLibName ghciLibName)</span><span>
</span><span id="line-1691"></span><span>    </span><span class="annot"><span class="annottext">IO () -&gt; IO ()
</span><a href="#local-6989586621679717707"><span class="hs-identifier hs-var">whenProf</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1692"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717704"><span class="hs-identifier hs-var">installOrdinary</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717703"><span class="hs-identifier hs-var">builtDir'</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717715"><span class="hs-identifier hs-var">targetDir</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#toJSLibName"><span class="hs-identifier hs-var">toJSLibName</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717697"><span class="hs-identifier hs-var">profileLibName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1693"></span><span>      </span><span class="hs-comment">-- whenGHCi $ installOrdinary builtDir targetDir (toJSLibName ghciProfLibName)</span><span>
</span><span id="line-1694"></span><span>    </span><span class="annot"><span class="annottext">IO () -&gt; IO ()
</span><a href="#local-6989586621679717706"><span class="hs-identifier hs-var">whenShared</span></a></span><span>  </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1695"></span><span>      </span><span class="annot"><span class="annottext">[IO ()] -&gt; IO ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Foldable t, Monad m) =&gt;
t (m a) -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#sequence_"><span class="hs-identifier hs-var">sequence_</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717696"><span class="hs-identifier hs-var">installShared</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717703"><span class="hs-identifier hs-var">builtDir'</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717714"><span class="hs-identifier hs-var">dynlibTargetDir</span></a></span><span>
</span><span id="line-1696"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#toJSLibName"><span class="hs-identifier hs-var">toJSLibName</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; CompilerId -&gt; String -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#mkGenericSharedLibName"><span class="hs-identifier hs-var">mkGenericSharedLibName</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621679717694"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerId
</span><a href="#local-6989586621679717693"><span class="hs-identifier hs-var">compiler_id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717692"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717691"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1697"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679717692"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717692"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; String
</span><a href="Distribution.Types.UnitId.html#getHSLibraryName"><span class="hs-identifier hs-var">getHSLibraryName</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679717690"><span class="hs-identifier hs-var">uid</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraBundledLibs"><span class="hs-identifier hs-var hs-var">extraBundledLibs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1698"></span><span>                </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679717691"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717691"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#extraDynLibFlavours"><span class="hs-identifier hs-var hs-var">extraDynLibFlavours</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1699"></span><span>                </span><span class="hs-special">]</span><span>
</span><span id="line-1700"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1701"></span><span>    </span><span id="local-6989586621679717703"><span class="annot"><span class="annottext">builtDir' :: String
</span><a href="#local-6989586621679717703"><span class="hs-identifier hs-var hs-var">builtDir'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.LocalBuildInfo.html#componentBuildDir"><span class="hs-identifier hs-var">componentBuildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717710"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-1702"></span><span>
</span><span id="line-1703"></span><span>    </span><span id="local-6989586621679717685"><span class="annot"><span class="annottext">install :: Bool -&gt; Bool -&gt; String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717685"><span class="hs-identifier hs-var hs-var">install</span></a></span></span><span> </span><span id="local-6989586621679717684"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717684"><span class="hs-identifier hs-var">isShared</span></a></span></span><span> </span><span id="local-6989586621679717683"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717683"><span class="hs-identifier hs-var">isJS</span></a></span></span><span> </span><span id="local-6989586621679717682"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717682"><span class="hs-identifier hs-var">srcDir</span></a></span></span><span> </span><span id="local-6989586621679717681"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717681"><span class="hs-identifier hs-var">dstDir</span></a></span></span><span> </span><span id="local-6989586621679717680"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717680"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1704"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717679"><span class="annot"><span class="annottext">src :: String
</span><a href="#local-6989586621679717679"><span class="hs-identifier hs-var hs-var">src</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717682"><span class="hs-identifier hs-var">srcDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717680"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-1705"></span><span>          </span><span id="local-6989586621679717678"><span class="annot"><span class="annottext">dst :: String
</span><a href="#local-6989586621679717678"><span class="hs-identifier hs-var hs-var">dst</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717681"><span class="hs-identifier hs-var">dstDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717680"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-1706"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; Bool -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#createDirectoryIfMissingVerbose"><span class="hs-identifier hs-var">createDirectoryIfMissingVerbose</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717717"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717681"><span class="hs-identifier hs-var">dstDir</span></a></span><span>
</span><span id="line-1707"></span><span>
</span><span id="line-1708"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717684"><span class="hs-identifier hs-var">isShared</span></a></span><span>
</span><span id="line-1709"></span><span>        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#installExecutableFile"><span class="hs-identifier hs-var">installExecutableFile</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717717"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717679"><span class="hs-identifier hs-var">src</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717678"><span class="hs-identifier hs-var">dst</span></a></span><span>
</span><span id="line-1710"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#installOrdinaryFile"><span class="hs-identifier hs-var">installOrdinaryFile</span></a></span><span>   </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717717"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717679"><span class="hs-identifier hs-var">src</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717678"><span class="hs-identifier hs-var">dst</span></a></span><span>
</span><span id="line-1711"></span><span>
</span><span id="line-1712"></span><span>      </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#stripLibs"><span class="hs-identifier hs-var hs-var">stripLibs</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717683"><span class="hs-identifier hs-var">isJS</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1713"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; Platform -&gt; ProgramDb -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Program.Strip.html#stripLib"><span class="hs-identifier hs-var">Strip.stripLib</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717717"><span class="hs-identifier hs-var">verbosity</span></a></span><span>
</span><span id="line-1714"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717678"><span class="hs-identifier hs-var">dst</span></a></span><span>
</span><span id="line-1715"></span><span>
</span><span id="line-1716"></span><span>    </span><span id="local-6989586621679717704"><span class="annot"><span class="annottext">installOrdinary :: String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717704"><span class="hs-identifier hs-var hs-var">installOrdinary</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717685"><span class="hs-identifier hs-var">install</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1717"></span><span>    </span><span id="local-6989586621679717696"><span class="annot"><span class="annottext">installShared :: String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717696"><span class="hs-identifier hs-var hs-var">installShared</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; String -&gt; String -&gt; String -&gt; IO ()
</span><a href="#local-6989586621679717685"><span class="hs-identifier hs-var">install</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1718"></span><span>
</span><span id="line-1719"></span><span>    </span><span id="local-6989586621679717708"><span class="annot"><span class="annottext">copyModuleFiles :: String -&gt; IO ()
</span><a href="#local-6989586621679717708"><span class="hs-identifier hs-var hs-var">copyModuleFiles</span></a></span></span><span> </span><span id="local-6989586621679717673"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717673"><span class="hs-identifier hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1720"></span><span>      </span><span class="annot"><span class="annottext">Verbosity
-&gt; [String] -&gt; [String] -&gt; [ModuleName] -&gt; IO [(String, String)]
</span><a href="Distribution.Simple.Utils.html#findModuleFilesEx"><span class="hs-identifier hs-var">findModuleFilesEx</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717717"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717703"><span class="hs-identifier hs-var">builtDir'</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717673"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; ComponentLocalBuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.LocalBuildInfo.html#allLibModules"><span class="hs-identifier hs-var">allLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717710"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1721"></span><span>      </span><span class="annot"><span class="annottext">IO [(String, String)] -&gt; ([(String, String)] -&gt; IO ()) -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; [(String, String)] -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#installOrdinaryFiles"><span class="hs-identifier hs-var">installOrdinaryFiles</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717717"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717715"><span class="hs-identifier hs-var">targetDir</span></a></span><span>
</span><span id="line-1722"></span><span>
</span><span id="line-1723"></span><span>    </span><span id="local-6989586621679717693"><span class="annot"><span class="annottext">compiler_id :: CompilerId
</span><a href="#local-6989586621679717693"><span class="hs-identifier hs-var hs-var">compiler_id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1724"></span><span>    </span><span id="local-6989586621679717694"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621679717694"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-1725"></span><span>    </span><span id="local-6989586621679717690"><span class="annot"><span class="annottext">uid :: UnitId
</span><a href="#local-6989586621679717690"><span class="hs-identifier hs-var hs-var">uid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; UnitId
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentUnitId"><span class="hs-identifier hs-var hs-var">componentUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717710"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-1726"></span><span>    </span><span class="hs-comment">-- vanillaLibName = mkLibName              uid</span><span>
</span><span id="line-1727"></span><span>    </span><span id="local-6989586621679717697"><span class="annot"><span class="annottext">profileLibName :: String
</span><a href="#local-6989586621679717697"><span class="hs-identifier hs-var hs-var">profileLibName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#mkProfLibName"><span class="hs-identifier hs-var">mkProfLibName</span></a></span><span>          </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679717690"><span class="hs-identifier hs-var">uid</span></a></span><span>
</span><span id="line-1728"></span><span>    </span><span class="hs-comment">-- sharedLibName  = (mkSharedLibName (hostPlatform lbi) compiler_id)  uid</span><span>
</span><span id="line-1729"></span><span>
</span><span id="line-1730"></span><span>    </span><span id="local-6989586621679717665"><span class="annot"><span class="annottext">hasLib :: Bool
</span><a href="#local-6989586621679717665"><span class="hs-identifier hs-var hs-var">hasLib</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; ComponentLocalBuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.LocalBuildInfo.html#allLibModules"><span class="hs-identifier hs-var">allLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717710"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1731"></span><span>                   </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1732"></span><span>                   </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1733"></span><span>                   </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildInfo -&gt; [String]
</span><a href="Distribution.Types.BuildInfo.html#jsSources"><span class="hs-identifier hs-var hs-var">jsSources</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; BuildInfo
</span><a href="Distribution.Types.Library.html#libBuildInfo"><span class="hs-identifier hs-var hs-var">libBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679717711"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1734"></span><span>    </span><span id="local-6989586621679717664"><span class="annot"><span class="annottext">has_code :: Bool
</span><a href="#local-6989586621679717664"><span class="hs-identifier hs-var hs-var">has_code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentLocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.ComponentLocalBuildInfo.html#componentIsIndefinite"><span class="hs-identifier hs-var">componentIsIndefinite</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679717710"><span class="hs-identifier hs-var">clbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1735"></span><span>    </span><span id="local-6989586621679717705"><span class="annot"><span class="annottext">whenHasCode :: IO () -&gt; IO ()
</span><a href="#local-6989586621679717705"><span class="hs-identifier hs-var hs-var">whenHasCode</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717664"><span class="hs-identifier hs-var">has_code</span></a></span><span>
</span><span id="line-1736"></span><span>    </span><span id="local-6989586621679717709"><span class="annot"><span class="annottext">whenVanilla :: IO () -&gt; IO ()
</span><a href="#local-6989586621679717709"><span class="hs-identifier hs-var hs-var">whenVanilla</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717665"><span class="hs-identifier hs-var">hasLib</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withVanillaLib"><span class="hs-identifier hs-var hs-var">withVanillaLib</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1737"></span><span>    </span><span id="local-6989586621679717707"><span class="annot"><span class="annottext">whenProf :: IO () -&gt; IO ()
</span><a href="#local-6989586621679717707"><span class="hs-identifier hs-var hs-var">whenProf</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717665"><span class="hs-identifier hs-var">hasLib</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withProfLib"><span class="hs-identifier hs-var hs-var">withProfLib</span></a></span><span>    </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717664"><span class="hs-identifier hs-var">has_code</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1738"></span><span>    </span><span class="hs-comment">-- whenGHCi    = when (hasLib &amp;&amp; withGHCiLib    lbi &amp;&amp; has_code)</span><span>
</span><span id="line-1739"></span><span>    </span><span id="local-6989586621679717706"><span class="annot"><span class="annottext">whenShared :: IO () -&gt; IO ()
</span><a href="#local-6989586621679717706"><span class="hs-identifier hs-var hs-var">whenShared</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717665"><span class="hs-identifier hs-var">hasLib</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withSharedLib"><span class="hs-identifier hs-var hs-var">withSharedLib</span></a></span><span>  </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717716"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679717664"><span class="hs-identifier hs-var">has_code</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1740"></span><span>
</span><span id="line-1741"></span><span>
</span><span id="line-1742"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#adjustExts"><span class="hs-identifier hs-type">adjustExts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.GHC.html#GhcOptions"><span class="hs-identifier hs-type">GhcOptions</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.GHC.html#GhcOptions"><span class="hs-identifier hs-type">GhcOptions</span></a></span><span>
</span><span id="line-1743"></span><span id="adjustExts"><span class="annot"><span class="annottext">adjustExts :: String -&gt; String -&gt; GhcOptions -&gt; GhcOptions
</span><a href="Distribution.Simple.GHCJS.html#adjustExts"><span class="hs-identifier hs-var hs-var">adjustExts</span></a></span></span><span> </span><span id="local-6989586621679717659"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717659"><span class="hs-identifier hs-var">hiSuf</span></a></span></span><span> </span><span id="local-6989586621679717658"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717658"><span class="hs-identifier hs-var">objSuf</span></a></span></span><span> </span><span id="local-6989586621679717657"><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717657"><span class="hs-identifier hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1744"></span><span>  </span><span class="annot"><span class="annottext">GhcOptions
</span><a href="#local-6989586621679717657"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions -&gt; GhcOptions -&gt; GhcOptions
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">GhcOptions
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1745"></span><span>    </span><span class="annot"><span class="annottext">ghcOptHiSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptHiSuffix"><span class="hs-identifier hs-var">ghcOptHiSuffix</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717659"><span class="hs-identifier hs-var">hiSuf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1746"></span><span>    </span><span class="annot"><span class="annottext">ghcOptObjSuffix :: Flag String
</span><a href="Distribution.Simple.Program.GHC.html#ghcOptObjSuffix"><span class="hs-identifier hs-var">ghcOptObjSuffix</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Flag String
forall a. a -&gt; Flag a
</span><a href="Distribution.Simple.Flag.html#toFlag"><span class="hs-identifier hs-var">toFlag</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717658"><span class="hs-identifier hs-var">objSuf</span></a></span><span>
</span><span id="line-1747"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-1748"></span><span>
</span><span id="line-1749"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#isDynamic"><span class="hs-identifier hs-type">isDynamic</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1750"></span><span id="isDynamic"><span class="annot"><span class="annottext">isDynamic :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#isDynamic"><span class="hs-identifier hs-var hs-var">isDynamic</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.GHC.Internal.html#ghcLookupProperty"><span class="hs-identifier hs-var">Internal.ghcLookupProperty</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHC Dynamic&quot;</span></span><span>
</span><span id="line-1751"></span><span>
</span><span id="line-1752"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#supportsDynamicToo"><span class="hs-identifier hs-type">supportsDynamicToo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1753"></span><span id="supportsDynamicToo"><span class="annot"><span class="annottext">supportsDynamicToo :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.GHCJS.html#supportsDynamicToo"><span class="hs-identifier hs-var hs-var">supportsDynamicToo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.GHC.Internal.html#ghcLookupProperty"><span class="hs-identifier hs-var">Internal.ghcLookupProperty</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Support dynamic-too&quot;</span></span><span>
</span><span id="line-1754"></span><span>
</span><span id="line-1755"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#withExt"><span class="hs-identifier hs-type">withExt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1756"></span><span id="withExt"><span class="annot"><span class="annottext">withExt :: String -&gt; String -&gt; String
</span><a href="Distribution.Simple.GHCJS.html#withExt"><span class="hs-identifier hs-var hs-var">withExt</span></a></span></span><span> </span><span id="local-6989586621679717655"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717655"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span id="local-6989586621679717654"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717654"><span class="hs-identifier hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717655"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717655"><span class="hs-identifier hs-var">fp</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717654"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717654"><span class="hs-identifier hs-var">ext</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-1757"></span><span>
</span><span id="line-1758"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#findGhcjsGhcVersion"><span class="hs-identifier hs-type">findGhcjsGhcVersion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1759"></span><span id="findGhcjsGhcVersion"><span class="annot"><span class="annottext">findGhcjsGhcVersion :: Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.GHCJS.html#findGhcjsGhcVersion"><span class="hs-identifier hs-var hs-var">findGhcjsGhcVersion</span></a></span></span><span> </span><span id="local-6989586621679717653"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717653"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717652"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717652"><span class="hs-identifier hs-var">pgm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1760"></span><span>  </span><span class="annot"><span class="annottext">String
-&gt; (String -&gt; String) -&gt; Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.Utils.html#findProgramVersion"><span class="hs-identifier hs-var">findProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--numeric-ghc-version&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717653"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717652"><span class="hs-identifier hs-var">pgm</span></a></span><span>
</span><span id="line-1761"></span><span>
</span><span id="line-1762"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#findGhcjsPkgGhcjsVersion"><span class="hs-identifier hs-type">findGhcjsPkgGhcjsVersion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1763"></span><span id="findGhcjsPkgGhcjsVersion"><span class="annot"><span class="annottext">findGhcjsPkgGhcjsVersion :: Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.GHCJS.html#findGhcjsPkgGhcjsVersion"><span class="hs-identifier hs-var hs-var">findGhcjsPkgGhcjsVersion</span></a></span></span><span> </span><span id="local-6989586621679717649"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717649"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717648"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717648"><span class="hs-identifier hs-var">pgm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1764"></span><span>  </span><span class="annot"><span class="annottext">String
-&gt; (String -&gt; String) -&gt; Verbosity -&gt; String -&gt; IO (Maybe Version)
</span><a href="Distribution.Simple.Utils.html#findProgramVersion"><span class="hs-identifier hs-var">findProgramVersion</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--numeric-ghcjs-version&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717649"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717648"><span class="hs-identifier hs-var">pgm</span></a></span><span>
</span><span id="line-1765"></span><span>
</span><span id="line-1766"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-1767"></span><span class="hs-comment">-- Registering</span><span>
</span><span id="line-1768"></span><span>
</span><span id="line-1769"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#hcPkgInfo"><span class="hs-identifier hs-type">hcPkgInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkg.HcPkgInfo</span></a></span><span>
</span><span id="line-1770"></span><span id="hcPkgInfo"><span class="annot"><span class="annottext">hcPkgInfo :: ProgramDb -&gt; HcPkgInfo
</span><a href="Distribution.Simple.GHCJS.html#hcPkgInfo"><span class="hs-identifier hs-var hs-var">hcPkgInfo</span></a></span></span><span> </span><span id="local-6989586621679717647"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679717647"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HcPkgInfo :: ConfiguredProgram
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; HcPkgInfo
</span><a href="Distribution.Simple.Program.HcPkg.html#HcPkgInfo"><span class="hs-identifier hs-type">HcPkg.HcPkgInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hcPkgProgram :: ConfiguredProgram
</span><a href="Distribution.Simple.Program.HcPkg.html#hcPkgProgram"><span class="hs-identifier hs-var">HcPkg.hcPkgProgram</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717644"><span class="hs-identifier hs-var">ghcjsPkgProg</span></a></span><span>
</span><span id="line-1771"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">noPkgDbStack :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#noPkgDbStack"><span class="hs-identifier hs-var">HcPkg.noPkgDbStack</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1772"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">noVerboseFlag :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#noVerboseFlag"><span class="hs-identifier hs-var">HcPkg.noVerboseFlag</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1773"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">flagPackageConf :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#flagPackageConf"><span class="hs-identifier hs-var">HcPkg.flagPackageConf</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1774"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">supportsDirDbs :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#supportsDirDbs"><span class="hs-identifier hs-var">HcPkg.supportsDirDbs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1775"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">requiresDirDbs :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#requiresDirDbs"><span class="hs-identifier hs-var">HcPkg.requiresDirDbs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679717638"><span class="hs-identifier hs-var">ver</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679717637"><span class="hs-identifier hs-var">v7_10</span></a></span><span>
</span><span id="line-1776"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">nativeMultiInstance :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#nativeMultiInstance"><span class="hs-identifier hs-var">HcPkg.nativeMultiInstance</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679717638"><span class="hs-identifier hs-var">ver</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679717637"><span class="hs-identifier hs-var">v7_10</span></a></span><span>
</span><span id="line-1777"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">recacheMultiInstance :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#recacheMultiInstance"><span class="hs-identifier hs-var">HcPkg.recacheMultiInstance</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1778"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">suppressFilesCheck :: Bool
</span><a href="Distribution.Simple.Program.HcPkg.html#suppressFilesCheck"><span class="hs-identifier hs-var">HcPkg.suppressFilesCheck</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1779"></span><span>                                   </span><span class="hs-special">}</span><span>
</span><span id="line-1780"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1781"></span><span>    </span><span id="local-6989586621679717637"><span class="annot"><span class="annottext">v7_10 :: Version
</span><a href="#local-6989586621679717637"><span class="hs-identifier hs-var hs-var">v7_10</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span class="hs-special">]</span><span>
</span><span id="line-1782"></span><span>    </span><span id="local-6989586621679717644"><span class="annot"><span class="annottext">ghcjsPkgProg :: ConfiguredProgram
</span><a href="#local-6989586621679717644"><span class="hs-identifier hs-var hs-var">ghcjsPkgProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ConfiguredProgram
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS.hcPkgInfo no ghcjs program&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe ConfiguredProgram -&gt; ConfiguredProgram)
-&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; Maybe ConfiguredProgram
</span><a href="Distribution.Simple.Program.Db.html#lookupProgram"><span class="hs-identifier hs-var">lookupProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsPkgProgram"><span class="hs-identifier hs-var">ghcjsPkgProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679717647"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-1783"></span><span>    </span><span id="local-6989586621679717638"><span class="annot"><span class="annottext">ver :: Version
</span><a href="#local-6989586621679717638"><span class="hs-identifier hs-var hs-var">ver</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Maybe Version -&gt; Version
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Version
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS.hcPkgInfo no ghcjs version&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe Version -&gt; Version) -&gt; Maybe Version -&gt; Version
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; Maybe Version
</span><a href="Distribution.Simple.Program.Types.html#programVersion"><span class="hs-identifier hs-var hs-var">programVersion</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717644"><span class="hs-identifier hs-var">ghcjsPkgProg</span></a></span><span>
</span><span id="line-1784"></span><span>
</span><span id="line-1785"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#registerPackage"><span class="hs-identifier hs-type">registerPackage</span></a></span><span>
</span><span id="line-1786"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-1787"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span>
</span><span id="line-1788"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span>
</span><span id="line-1789"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.InstalledPackageInfo.html#InstalledPackageInfo"><span class="hs-identifier hs-type">InstalledPackageInfo</span></a></span><span>
</span><span id="line-1790"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.HcPkg.html#RegisterOptions"><span class="hs-identifier hs-type">HcPkg.RegisterOptions</span></a></span><span>
</span><span id="line-1791"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1792"></span><span id="registerPackage"><span class="annot"><span class="annottext">registerPackage :: Verbosity
-&gt; ProgramDb
-&gt; [PackageDB]
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; IO ()
</span><a href="Distribution.Simple.GHCJS.html#registerPackage"><span class="hs-identifier hs-var hs-var">registerPackage</span></a></span></span><span> </span><span id="local-6989586621679717629"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717629"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717628"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679717628"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679717627"><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679717627"><span class="hs-identifier hs-var">packageDbs</span></a></span></span><span> </span><span id="local-6989586621679717626"><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679717626"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span></span><span> </span><span id="local-6989586621679717625"><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679717625"><span class="hs-identifier hs-var">registerOptions</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1793"></span><span>    </span><span class="annot"><span class="annottext">HcPkgInfo
-&gt; Verbosity
-&gt; [PackageDB]
-&gt; InstalledPackageInfo
-&gt; RegisterOptions
-&gt; IO ()
</span><a href="Distribution.Simple.Program.HcPkg.html#register"><span class="hs-identifier hs-var">HcPkg.register</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ProgramDb -&gt; HcPkgInfo
</span><a href="Distribution.Simple.GHCJS.html#hcPkgInfo"><span class="hs-identifier hs-var">hcPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679717628"><span class="hs-identifier hs-var">progdb</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717629"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679717627"><span class="hs-identifier hs-var">packageDbs</span></a></span><span>
</span><span id="line-1794"></span><span>                   </span><span class="annot"><span class="annottext">InstalledPackageInfo
</span><a href="#local-6989586621679717626"><span class="hs-identifier hs-var">installedPkgInfo</span></a></span><span> </span><span class="annot"><span class="annottext">RegisterOptions
</span><a href="#local-6989586621679717625"><span class="hs-identifier hs-var">registerOptions</span></a></span><span>
</span><span id="line-1795"></span><span>
</span><span id="line-1796"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#pkgRoot"><span class="hs-identifier hs-type">pkgRoot</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1797"></span><span id="pkgRoot"><span class="annot"><span class="annottext">pkgRoot :: Verbosity -&gt; LocalBuildInfo -&gt; PackageDB -&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#pkgRoot"><span class="hs-identifier hs-var hs-var">pkgRoot</span></a></span></span><span> </span><span id="local-6989586621679717623"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717623"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679717622"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717622"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; IO String
</span><a href="#local-6989586621679717621"><span class="hs-identifier hs-var">pkgRoot'</span></a></span><span>
</span><span id="line-1798"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-1799"></span><span>    </span><span id="local-6989586621679717621"><span class="annot"><span class="annottext">pkgRoot' :: PackageDB -&gt; IO String
</span><a href="#local-6989586621679717621"><span class="hs-identifier hs-var hs-var">pkgRoot'</span></a></span></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1800"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717613"><span class="annot"><span class="annottext">ghcjsProg :: ConfiguredProgram
</span><a href="#local-6989586621679717613"><span class="hs-identifier hs-var hs-var">ghcjsProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ConfiguredProgram
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS.pkgRoot: no ghcjs program&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe ConfiguredProgram -&gt; ConfiguredProgram)
-&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; Maybe ConfiguredProgram
</span><a href="Distribution.Simple.Program.Db.html#lookupProgram"><span class="hs-identifier hs-var">lookupProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ProgramDb
</span><a href="Distribution.Types.LocalBuildInfo.html#withPrograms"><span class="hs-identifier hs-var hs-var">withPrograms</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717622"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1801"></span><span>      </span><span class="hs-keyword">in</span><span>  </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; IO String -&gt; IO String
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Verbosity -&gt; ConfiguredProgram -&gt; IO String
</span><a href="Distribution.Simple.GHCJS.html#getGlobalPackageDB"><span class="hs-identifier hs-var">getGlobalPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679717623"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717613"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1802"></span><span>    </span><span class="annot"><a href="#local-6989586621679717621"><span class="hs-identifier hs-var">pkgRoot'</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#UserPackageDB"><span class="hs-identifier hs-var">UserPackageDB</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1803"></span><span>      </span><span id="local-6989586621679717612"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717612"><span class="hs-identifier hs-var">appDir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="../../directory/src/System.Directory.html#getAppUserDataDirectory"><span class="hs-identifier hs-var">getAppUserDataDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghcjs&quot;</span></span><span>
</span><span id="line-1804"></span><span>      </span><span class="hs-comment">-- fixme correct this version</span><span>
</span><span id="line-1805"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679717611"><span class="annot"><span class="annottext">ver :: Version
</span><a href="#local-6989586621679717611"><span class="hs-identifier hs-var hs-var">ver</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Version
</span><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier hs-var">compilerVersion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679717622"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1806"></span><span>          </span><span id="local-6989586621679717609"><span class="annot"><span class="annottext">subdir :: String
</span><a href="#local-6989586621679717609"><span class="hs-identifier hs-var hs-var">subdir</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="../../base/src/System.Info.html#arch"><span class="hs-identifier hs-var">System.Info.arch</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">String
</span><a href="../../base/src/System.Info.html#os"><span class="hs-identifier hs-var">System.Info.os</span></a></span><span>
</span><span id="line-1807"></span><span>                     </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">Version -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679717611"><span class="hs-identifier hs-var">ver</span></a></span><span>
</span><span id="line-1808"></span><span>          </span><span id="local-6989586621679717606"><span class="annot"><span class="annottext">rootDir :: String
</span><a href="#local-6989586621679717606"><span class="hs-identifier hs-var hs-var">rootDir</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717612"><span class="hs-identifier hs-var">appDir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717609"><span class="hs-identifier hs-var">subdir</span></a></span><span>
</span><span id="line-1809"></span><span>      </span><span class="hs-comment">-- We must create the root directory for the user package database if it</span><span>
</span><span id="line-1810"></span><span>      </span><span class="hs-comment">-- does not yet exists. Otherwise '${pkgroot}' will resolve to a</span><span>
</span><span id="line-1811"></span><span>      </span><span class="hs-comment">-- directory at the time of 'ghc-pkg register', and registration will</span><span>
</span><span id="line-1812"></span><span>      </span><span class="hs-comment">-- fail.</span><span>
</span><span id="line-1813"></span><span>      </span><span class="annot"><span class="annottext">Bool -&gt; String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#createDirectoryIfMissing"><span class="hs-identifier hs-var">createDirectoryIfMissing</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717606"><span class="hs-identifier hs-var">rootDir</span></a></span><span>
</span><span id="line-1814"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; IO String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717606"><span class="hs-identifier hs-var">rootDir</span></a></span><span>
</span><span id="line-1815"></span><span>    </span><span class="annot"><a href="#local-6989586621679717621"><span class="hs-identifier hs-var">pkgRoot'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-type">SpecificPackageDB</span></a></span><span> </span><span id="local-6989586621679717605"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717605"><span class="hs-identifier hs-var">fp</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717605"><span class="hs-identifier hs-var">fp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1816"></span><span>
</span><span id="line-1817"></span><span>
</span><span id="line-1818"></span><span class="hs-comment">-- | Get the JavaScript file name and command and arguments to run a</span><span>
</span><span id="line-1819"></span><span class="hs-comment">--   program compiled by GHCJS</span><span>
</span><span id="line-1820"></span><span class="hs-comment">--   the exe should be the base program name without exe extension</span><span>
</span><span id="line-1821"></span><span class="annot"><a href="Distribution.Simple.GHCJS.html#runCmd"><span class="hs-identifier hs-type">runCmd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Program.Db.html#ProgramDb"><span class="hs-identifier hs-type">ProgramDb</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-1822"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1823"></span><span id="runCmd"><span class="annot"><span class="annottext">runCmd :: ProgramDb -&gt; String -&gt; (String, String, [String])
</span><a href="Distribution.Simple.GHCJS.html#runCmd"><span class="hs-identifier hs-var hs-var">runCmd</span></a></span></span><span> </span><span id="local-6989586621679717604"><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679717604"><span class="hs-identifier hs-var">progdb</span></a></span></span><span> </span><span id="local-6989586621679717603"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717603"><span class="hs-identifier hs-var">exe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1824"></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717602"><span class="hs-identifier hs-var">script</span></a></span><span>
</span><span id="line-1825"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; String
</span><a href="Distribution.Simple.Program.Types.html#programPath"><span class="hs-identifier hs-var">programPath</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717601"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span>
</span><span id="line-1826"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [String]
</span><a href="Distribution.Simple.Program.Types.html#programDefaultArgs"><span class="hs-identifier hs-var hs-var">programDefaultArgs</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717601"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; [String]
</span><a href="Distribution.Simple.Program.Types.html#programOverrideArgs"><span class="hs-identifier hs-var hs-var">programOverrideArgs</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram
</span><a href="#local-6989586621679717601"><span class="hs-identifier hs-var">ghcjsProg</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;--run&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-1827"></span><span>  </span><span class="hs-special">)</span><span>
</span><span id="line-1828"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1829"></span><span>    </span><span id="local-6989586621679717602"><span class="annot"><span class="annottext">script :: String
</span><a href="#local-6989586621679717602"><span class="hs-identifier hs-var hs-var">script</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679717603"><span class="hs-identifier hs-var">exe</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;jsexe&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;all&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;js&quot;</span></span><span>
</span><span id="line-1830"></span><span>    </span><span id="local-6989586621679717601"><span class="annot"><span class="annottext">ghcjsProg :: ConfiguredProgram
</span><a href="#local-6989586621679717601"><span class="hs-identifier hs-var hs-var">ghcjsProg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConfiguredProgram -&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ConfiguredProgram
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHCJS.runCmd: no ghcjs program&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe ConfiguredProgram -&gt; ConfiguredProgram)
-&gt; Maybe ConfiguredProgram -&gt; ConfiguredProgram
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Program -&gt; ProgramDb -&gt; Maybe ConfiguredProgram
</span><a href="Distribution.Simple.Program.Db.html#lookupProgram"><span class="hs-identifier hs-var">lookupProgram</span></a></span><span> </span><span class="annot"><span class="annottext">Program
</span><a href="Distribution.Simple.Program.Builtin.html#ghcjsProgram"><span class="hs-identifier hs-var">ghcjsProgram</span></a></span><span> </span><span class="annot"><span class="annottext">ProgramDb
</span><a href="#local-6989586621679717604"><span class="hs-identifier hs-var">progdb</span></a></span><span>
</span><span id="line-1831"></span></pre></body></html>